]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/core/dbus-timer.c
tree-wide: use TAKE_PTR() and TAKE_FD() macros
[thirdparty/systemd.git] / src / core / dbus-timer.c
index 1eedf217fe2c8b7d60ccc3d3a4a637be1392342d..1fa19966c894cbb994d8b4cdbeb9556da6ba1356 100644 (file)
@@ -290,8 +290,7 @@ static int bus_timer_set_transient_property(
                                         return -ENOMEM;
 
                                 v->base = b;
-                                v->calendar_spec = c;
-                                c = NULL;
+                                v->calendar_spec = TAKE_PTR(c);
 
                                 LIST_PREPEND(value, t->values, v);
                         }
@@ -377,8 +376,7 @@ static int bus_timer_set_transient_property(
                                 return -ENOMEM;
 
                         v->base = TIMER_CALENDAR;
-                        v->calendar_spec = c;
-                        c = NULL;
+                        v->calendar_spec = TAKE_PTR(c);
 
                         LIST_PREPEND(value, t->values, v);
                 }