From c14cc49149d98338f8fcd42c360b937f5ddb3990 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 2f4ec903a..9fcceab1f 100644 --- a/src/common/utils.c +++ b/src/common/utils.c @@ -124,6 +124,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