diff --git a/src/zhttp_response.c b/src/zhttp_response.c index 916436010..e00d3ff10 100644 --- a/src/zhttp_response.c +++ b/src/zhttp_response.c @@ -119,6 +119,7 @@ zhttp_response_recv (zhttp_response_t *self, zhttp_client_t *client, void** arg_ self->free_content = self->content != NULL; if (result != 0) { + zhash_destroy(&self->headers); self->headers = zhash_new (); zhash_autofree (self->headers); @@ -247,4 +248,4 @@ zhttp_response_reset_content (zhttp_response_t *self) { void zhttp_response_test (bool verbose) { -} \ No newline at end of file +}