forked from lda/telodendria
Fix a few more calls to free()
This commit is contained in:
parent
8cb86e8f67
commit
80366fc294
2 changed files with 8 additions and 6 deletions
|
@ -25,8 +25,8 @@
|
||||||
#include <Matrix.h>
|
#include <Matrix.h>
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
|
#include <Memory.h>
|
||||||
#include <HttpServer.h>
|
#include <HttpServer.h>
|
||||||
#include <Json.h>
|
#include <Json.h>
|
||||||
#include <Util.h>
|
#include <Util.h>
|
||||||
|
@ -116,7 +116,7 @@ MatrixHttpHandler(HttpServerContext * context, void *argp)
|
||||||
response = MatrixErrorCreate(M_NOT_FOUND);
|
response = MatrixErrorCreate(M_NOT_FOUND);
|
||||||
}
|
}
|
||||||
|
|
||||||
free(pathPart);
|
Free(pathPart);
|
||||||
|
|
||||||
HttpSendHeaders(context);
|
HttpSendHeaders(context);
|
||||||
stream = HttpStream(context);
|
stream = HttpStream(context);
|
||||||
|
@ -137,7 +137,7 @@ MatrixHttpHandler(HttpServerContext * context, void *argp)
|
||||||
*/
|
*/
|
||||||
while ((pathPart = MATRIX_PATH_POP(pathParts)) != NULL)
|
while ((pathPart = MATRIX_PATH_POP(pathParts)) != NULL)
|
||||||
{
|
{
|
||||||
free(pathPart);
|
Free(pathPart);
|
||||||
}
|
}
|
||||||
|
|
||||||
ArrayFree(pathParts);
|
ArrayFree(pathParts);
|
||||||
|
|
|
@ -406,9 +406,9 @@ main(int argc, char **argv)
|
||||||
|
|
||||||
/* These config values are no longer needed; don't hold them in
|
/* These config values are no longer needed; don't hold them in
|
||||||
* memory anymore */
|
* memory anymore */
|
||||||
free(tConfig->dataDir);
|
Free(tConfig->dataDir);
|
||||||
free(tConfig->uid);
|
Free(tConfig->uid);
|
||||||
free(tConfig->gid);
|
Free(tConfig->gid);
|
||||||
|
|
||||||
tConfig->dataDir = NULL;
|
tConfig->dataDir = NULL;
|
||||||
tConfig->uid = NULL;
|
tConfig->uid = NULL;
|
||||||
|
@ -455,5 +455,7 @@ finish:
|
||||||
|
|
||||||
Log(lc, LOG_DEBUG, "Exiting with code '%d'.", exit);
|
Log(lc, LOG_DEBUG, "Exiting with code '%d'.", exit);
|
||||||
LogConfigFree(lc);
|
LogConfigFree(lc);
|
||||||
|
|
||||||
|
MemoryFreeAll();
|
||||||
return exit;
|
return exit;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue