chiark / gitweb /
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 dcc8321f505ee685727ae8b3a7f3565eb6795b2d..3256deeec1e3535f25da63c48ba3a978fb49674d 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;
                         }