diff --git a/src/lib/http.c b/src/lib/http.c index bca8f3f..04c9b34 100644 --- a/src/lib/http.c +++ b/src/lib/http.c @@ -101,6 +101,7 @@ void http_free_field(http_field *f) { } void http_free_hdr(http_hdr *hdr) { + if (hdr->fields == NULL) return; for (int i = 0; i < list_size(hdr->fields); i++) { http_free_field(&hdr->fields[i]); }