shared: path-util - memory leak
authorTom Gundersen <teg@jklm.no>
Tue, 16 Dec 2014 21:24:54 +0000 (22:24 +0100)
committerTom Gundersen <teg@jklm.no>
Tue, 16 Dec 2014 21:54:04 +0000 (22:54 +0100)
src/shared/path-util.c

index dcc8321..3256dee 100644 (file)
@@ -306,6 +306,7 @@ char **path_strv_resolve(char **l, const char *prefix) {
                         } else {
                                 /* canonicalized path goes outside of
                                  * prefix, keep the original path instead */
+                                free(u);
                                 u = orig;
                                 orig = NULL;
                         }