chiark / gitweb /
coverity: fix a couple of bugs found by coverity
[elogind.git] / src / systemctl.c
index 7caeb6dd91bd81a54fb6a7b486f2d6b55020133d..e85a2fd44c249337bba3e08bfc7a6c8dbd426156 100644 (file)
@@ -608,6 +608,7 @@ static int list_unit_files(DBusConnection *bus, char **args) {
 
                 r = unit_file_get_list(arg_scope, arg_root, h);
                 if (r < 0) {
+                        unit_file_list_free(h);
                         log_error("Failed to get unit file list: %s", strerror(-r));
                         return r;
                 }