From: Lennart Poettering Date: Thu, 31 May 2018 10:05:20 +0000 (+0200) Subject: portablectl: coccinelle says we should use TAKE_PTR() here, do so X-Git-Tag: v239~173^2~5 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=810aa42575a0431c4c9ccbd86f85017a83ec7b46;p=thirdparty%2Fsystemd.git portablectl: coccinelle says we should use TAKE_PTR() here, do so --- diff --git a/src/portable/portablectl.c b/src/portable/portablectl.c index 200435caae1..21057154c55 100644 --- a/src/portable/portablectl.c +++ b/src/portable/portablectl.c @@ -104,8 +104,7 @@ static int extract_prefix(const char *path, char **ret) { if (!filename_is_valid(name)) return -EINVAL; - *ret = name; - name = NULL; + *ret = TAKE_PTR(name); return 0; }