From 80366fc294f38665f26259f19d2f8f6df60e6e28 Mon Sep 17 00:00:00 2001 From: Jordan Bancino Date: Thu, 13 Oct 2022 12:27:24 -0400 Subject: [PATCH] Fix a few more calls to free() --- src/Matrix.c | 6 +++--- src/Telodendria.c | 8 +++++--- 2 files changed, 8 insertions(+), 6 deletions(-) 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; }