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:
parent
52a2ab41e0
commit
d54110d11d
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user