forked from Telodendria/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);
|
||||
|
||||
/* It is up to the handler to free its values */
|
||||
while (HashMapIterate(c->responseHeaders, &key, &val))
|
||||
{
|
||||
Free(key);
|
||||
Free(val);
|
||||
}
|
||||
|
||||
HashMapFree(c->responseHeaders);
|
||||
|
||||
Free(c->requestPath);
|
||||
fclose(c->stream);
|
||||
|
||||
Free(c);
|
||||
}
|
||||
|
||||
HashMap *
|
||||
|
|
Loading…
Reference in a new issue