From: Lennart Poettering Date: Wed, 29 Jul 2020 17:09:48 +0000 (+0200) Subject: path-util: make use of TAKE_PTR() where we can X-Git-Tag: v246~5 X-Git-Url: http://git.ipfire.org/?p=thirdparty%2Fsystemd.git;a=commitdiff_plain;h=2f2c60d7fedc46486a83069163d2cbfc14b4d713 path-util: make use of TAKE_PTR() where we can --- 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; }