mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-12-23 17:34:00 +03:00
path-util: make use of TAKE_PTR() where we can
This commit is contained in:
parent
b6eb208b29
commit
2f2c60d7fe
@ -640,10 +640,8 @@ int find_binary(const char *name, char **ret) {
|
||||
if (access(j, X_OK) >= 0) {
|
||||
/* Found it! */
|
||||
|
||||
if (ret) {
|
||||
*ret = path_simplify(j, false);
|
||||
j = NULL;
|
||||
}
|
||||
if (ret)
|
||||
*ret = path_simplify(TAKE_PTR(j), false);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user