From a3aa2321212ac8a85fc9eb626b605b2834a541e3 Mon Sep 17 00:00:00 2001 From: Adrien Bourmault Date: Tue, 21 Sep 2021 23:09:38 +0200 Subject: [PATCH] Corrected a forgotten free --- Makefile | 2 +- src/model.c | 1 + src/parsing.c | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 30ce70d..65a91ba 100644 --- a/Makefile +++ b/Makefile @@ -122,7 +122,7 @@ run-gdb: all -ex "set args -C debian/etc -M debian/var/models -U debian/var/users" run-valgrind: all - @valgrind bin/gem-graph-server \ + @valgrind --leak-check=full -s bin/gem-graph-server \ -C debian/etc -M debian/var/models -U debian/var/users run-both: all diff --git a/src/model.c b/src/model.c index c9b816c..a587c37 100644 --- a/src/model.c +++ b/src/model.c @@ -291,6 +291,7 @@ void ModelSystemInit(Parameters_t *parameters) printLog("Loaded model %s\n", newModel->name); } } + free(modelDir); } void ModelSystemDestroy(void) diff --git a/src/parsing.c b/src/parsing.c index 480cdee..c1336ef 100644 --- a/src/parsing.c +++ b/src/parsing.c @@ -327,8 +327,8 @@ int ParseModelIdentityXML(Model_t *model, Parameters_t *params) }; // Allocating space for schema file path - schemPath = (char*)calloc(1, strlen(params->modelDir) - + strlen("/schemas/model_x.x.xmls")); + schemPath = (char*) calloc(1, strlen(params->modelDir) + + strlen("/schemas/model_ .xmls")); printLog("Preparsing model %s\n", model->name);