From 810aa42575a0431c4c9ccbd86f85017a83ec7b46 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 31 May 2018 12:05:20 +0200 Subject: [PATCH] portablectl: coccinelle says we should use TAKE_PTR() here, do so --- src/portable/portablectl.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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; } -- 2.47.3