]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
analyze: fix mem leak
authorThomas Hindoe Paaboel Andersen <phomes@gmail.com>
Sat, 13 Sep 2014 10:29:43 +0000 (12:29 +0200)
committerThomas Hindoe Paaboel Andersen <phomes@gmail.com>
Sat, 13 Sep 2014 10:38:39 +0000 (12:38 +0200)
Found with Coverity. Fixes: CID#1237756

src/analyze/analyze.c

index 1281d6b9ea835dfaae5ccf1a6a40bc6a059687f5..82f5cf3c57d044c41b50d6c046b8fe45bdff838c 100644 (file)
@@ -848,7 +848,8 @@ static int list_dependencies(sd_bus *bus, const char *name) {
         char ts[FORMAT_TIMESPAN_MAX];
         struct unit_times *times;
         int r;
-        const char *path, *id;
+        const char *id;
+        _cleanup_free_ char *path = NULL;
         _cleanup_bus_message_unref_ sd_bus_message *reply = NULL;
         _cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL;
         struct boot_times *boot;