1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-11 09:18:07 +03:00

systemctl: it's probably a good idea not to alter return parameters if we fail

We generally follow the rule not to touch return values unless we
succeed, so for the sake of uniformity do the same here.
This commit is contained in:
Lennart Poettering 2013-01-18 00:53:06 +01:00
parent 52a2ab41e0
commit d54110d11d

View File

@ -842,8 +842,9 @@ static int list_dependencies_get_dependencies(DBusConnection *bus, const char *n
}
finish:
if (r < 0)
strv_freep(&ret);
*deps = ret;
strv_free(ret);
else
*deps = ret;
return r;
}