X-Git-Url: http://git.ipfire.org/?p=thirdparty%2Fsystemd.git;a=blobdiff_plain;f=src%2Fbasic%2Fpath-util.c;h=c4e022b3a1187806635f771c7825322b42e4913c;hp=986dfe94a4b719b16e13c50b94bf6d041887c42d;hb=2f2c60d7fedc46486a83069163d2cbfc14b4d713;hpb=b6eb208b29ae720e45a2950453fa4278a88bbcc9 diff --git a/src/basic/path-util.c b/src/basic/path-util.c index 986dfe94a4b..c4e022b3a11 100644 --- a/src/basic/path-util.c +++ b/src/basic/path-util.c @@ -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; }