Fix: prevent dangling pointer in utils_partial_realpath
authorAntoine Busque <abusque@efficios.com>
Wed, 16 Sep 2015 06:58:40 +0000 (02:58 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 17 Sep 2015 01:05:48 +0000 (21:05 -0400)
Signed-off-by: Antoine Busque <abusque@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/common/utils.c

index 2f4ec903a2f9b849f1d0c32121400dfda5368844..9fcceab1f3149c2c5e17a3e68d4ee1b60fc4932c 100644 (file)
@@ -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 */
This page took 0.027672 seconds and 5 git commands to generate.