Fix: Double free in utils_partial_realpath error path
authorMichael Jeanson <mjeanson@efficios.com>
Wed, 18 May 2016 16:17:27 +0000 (12:17 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 20 May 2016 19:17:23 +0000 (15:17 -0400)
Fixes coverity #1355521

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/common/utils.c

index bbe13ed7dc5474bfbd1fbe4124242d65d5391a7e..217d8c65d070a22ac3a0265cf63fbba1dc0a0e3f 100644 (file)
@@ -177,7 +177,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.034319 seconds and 4 git commands to generate.