]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/vconsole/vconsole-setup.c
macro: introduce TAKE_PTR() macro
[thirdparty/systemd.git] / src / vconsole / vconsole-setup.c
index a9cc2bf63c1700ee309baceb21107694fcac6a5d..6bde3da1c8d9c00b6ef6aa46faeceb841e7902e3 100644 (file)
@@ -358,8 +358,7 @@ static int find_source_vc(char **ret_path, unsigned *ret_idx) {
 
                 /* all checks passed, return this one as a source console */
                 *ret_idx = i;
-                *ret_path = path;
-                path = NULL;
+                *ret_path = TAKE_PTR(path);
                 ret_fd = fd;
                 fd = -1;
                 return ret_fd;