void http_req_destroy(http_req *a_req) { if (!a_req) return; if (a_req->headers) http_hdr_list_destroy(a_req->headers); free(a_req); }
void http_resp_destroy(http_resp_t *resp) { if (resp == NULL) return; if (resp->headers) http_hdr_list_destroy(resp->headers); if(resp->reason_phrase) free(resp->reason_phrase); if (resp->body) free(resp->body); free(resp); }
void http_resp_destroy(http_resp *a_resp) { if (!a_resp) return; if (a_resp->reason_phrase) free(a_resp->reason_phrase); if (a_resp->headers) http_hdr_list_destroy(a_resp->headers); if (a_resp->body) free(a_resp->body); free(a_resp); return; }