diff --git a/src/Matrix.c b/src/Matrix.c index 36c9f1c..88f5d78 100644 --- a/src/Matrix.c +++ b/src/Matrix.c @@ -25,8 +25,8 @@ #include #include -#include +#include #include #include #include @@ -116,7 +116,7 @@ MatrixHttpHandler(HttpServerContext * context, void *argp) response = MatrixErrorCreate(M_NOT_FOUND); } - free(pathPart); + Free(pathPart); HttpSendHeaders(context); stream = HttpStream(context); @@ -137,7 +137,7 @@ MatrixHttpHandler(HttpServerContext * context, void *argp) */ while ((pathPart = MATRIX_PATH_POP(pathParts)) != NULL) { - free(pathPart); + Free(pathPart); } ArrayFree(pathParts); diff --git a/src/Telodendria.c b/src/Telodendria.c index b812e3f..9cbe84b 100644 --- a/src/Telodendria.c +++ b/src/Telodendria.c @@ -406,9 +406,9 @@ main(int argc, char **argv) /* These config values are no longer needed; don't hold them in * memory anymore */ - free(tConfig->dataDir); - free(tConfig->uid); - free(tConfig->gid); + Free(tConfig->dataDir); + Free(tConfig->uid); + Free(tConfig->gid); tConfig->dataDir = NULL; tConfig->uid = NULL; @@ -455,5 +455,7 @@ finish: Log(lc, LOG_DEBUG, "Exiting with code '%d'.", exit); LogConfigFree(lc); + + MemoryFreeAll(); return exit; }