Fix: Double free in utils_partial_realpath error path
[lttng-tools.git] / src / common / utils.c
index 25639461cc3ae03e147ff0224364c4db21fb8876..3892cb4ada8b613b2396866e033bf16311abf7a4 100644 (file)
@@ -174,7 +174,9 @@ error:
        free(resolved_path);
        free(cut_path);
        free(try_path);
-       free(try_path_prev);
+       if (try_path_prev != try_path) {
+               free(try_path_prev);
+       }
        return NULL;
 }
 
This page took 0.023215 seconds and 4 git commands to generate.