forked from lda/telodendria
Fix some server context memory leaks.
This commit is contained in:
parent
80366fc294
commit
65dad27902
1 changed files with 8 additions and 1 deletions
|
@ -126,11 +126,18 @@ HttpServerContextFree(HttpServerContext * c)
|
||||||
}
|
}
|
||||||
HashMapFree(c->requestHeaders);
|
HashMapFree(c->requestHeaders);
|
||||||
|
|
||||||
/* It is up to the handler to free its values */
|
while (HashMapIterate(c->responseHeaders, &key, &val))
|
||||||
|
{
|
||||||
|
Free(key);
|
||||||
|
Free(val);
|
||||||
|
}
|
||||||
|
|
||||||
HashMapFree(c->responseHeaders);
|
HashMapFree(c->responseHeaders);
|
||||||
|
|
||||||
Free(c->requestPath);
|
Free(c->requestPath);
|
||||||
fclose(c->stream);
|
fclose(c->stream);
|
||||||
|
|
||||||
|
Free(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
HashMap *
|
HashMap *
|
||||||
|
|
Loading…
Reference in a new issue