]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core: use TAKE_PTR() at few more places
authorYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 15 Mar 2019 10:01:12 +0000 (19:01 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 15 Mar 2019 10:01:12 +0000 (19:01 +0900)
src/core/main.c

index 981513bbc3b74acadbe5f31aace01e4c353bee6f..1617b237672e599c5fb4b898120fded0f91c4fc4 100644 (file)
@@ -1908,9 +1908,8 @@ static int invoke_main_loop(
                         *ret_shutdown_verb = NULL;
 
                         /* Steal the switch root parameters */
-                        *ret_switch_root_dir = m->switch_root;
-                        *ret_switch_root_init = m->switch_root_init;
-                        m->switch_root = m->switch_root_init = NULL;
+                        *ret_switch_root_dir = TAKE_PTR(m->switch_root);
+                        *ret_switch_root_init = TAKE_PTR(m->switch_root_init);
 
                         return 0;