void sc_request_free(sc_request_t **request) { if (!request) return; if (*request) { if ((*request)->headers) sc_request_free_nameVals(&(*request)->headers); if ((*request)->params) sc_request_free_nameVals(&(*request)->params); free(*request); } *request = NULL; }
void sc_request_free(sc_request_t *request) { sc_request_free_nameVals(request->headers); free(request); request = NULL; }