From ac54ff8c1d44a38e03076a0a02cab47295296f29 Mon Sep 17 00:00:00 2001 From: Antoine Busque Date: Wed, 16 Sep 2015 02:58:40 -0400 Subject: [PATCH] Fix: prevent dangling pointer in utils_partial_realpath MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Antoine Busque Signed-off-by: Jérémie Galarneau --- src/common/utils.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/common/utils.c b/src/common/utils.c index d4ff94c7a..bf6751ebb 100644 --- a/src/common/utils.c +++ b/src/common/utils.c @@ -121,6 +121,7 @@ char *utils_partial_realpath(const char *path, char *resolved_path, size_t size) /* Free the allocated memory */ free(cut_path); + cut_path = NULL; }; /* Allocate memory for the resolved path if necessary */ -- 2.34.1