]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
xdg-autostart-service: rely on the new double-eval-free free_and_replace() 20348/head
authorLennart Poettering <lennart@poettering.net>
Thu, 29 Jul 2021 19:13:03 +0000 (21:13 +0200)
committerLennart Poettering <lennart@poettering.net>
Thu, 29 Jul 2021 19:13:03 +0000 (21:13 +0200)
These semi-reverts 2744c7bb0176dc6b86a69acd4c449ea9e269e097

src/xdg-autostart-generator/xdg-autostart-service.c

index f21d3f54b1315288f992de007a55f5ae58706eb3..501cdca0b6e4d2351f083a06c8e3707b941e5bc7 100644 (file)
@@ -416,8 +416,7 @@ int xdg_autostart_format_exec_start(
                         if (!escaped)
                                 return log_oom();
 
-                        free_and_replace(exec_split[n], escaped);
-                        n++;
+                        free_and_replace(exec_split[n++], escaped);
                         continue;
                 }
 
@@ -457,8 +456,7 @@ int xdg_autostart_format_exec_start(
                 if (!quoted)
                         return log_oom();
 
-                free_and_replace(exec_split[n], quoted);
-                n++;
+                free_and_replace(exec_split[n++], quoted);
         }
         for (; exec_split[n]; n++)
                 exec_split[n] = mfree(exec_split[n]);