path-util: make use of TAKE_PTR() where we can

This commit is contained in:
Lennart Poettering
2020-07-30 16:42:58 +02:00
parent b6eb208b29
commit 2f2c60d7fe
+2 -4
View File
@@ -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;
}