Fix: prevent dangling pointer in utils_partial_realpath
[lttng-tools.git] / src / common / utils.c
index d4ff94c7a09680308516e9cd6301b6ce8003844d..bf6751ebb95c4e121d4e8a2bf9c45dd858d4efe2 100644 (file)
@@ -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 */
This page took 0.024918 seconds and 4 git commands to generate.