chiark / gitweb /
Unifiy free() usage
[elogind.git] / src / login / logind-dbus.c
index 5dedbfc907496513ca1919a1e537ae4925ef69f0..800e2a51b63185cfa6a0b7bb18ffd10a33fb5a45 100644 (file)
@@ -1998,8 +1998,7 @@ static int method_cancel_scheduled_shutdown(sd_bus_message *message, void *userd
         m->scheduled_shutdown_timeout_source = sd_event_source_unref(m->scheduled_shutdown_timeout_source);
         m->wall_message_timeout_source = sd_event_source_unref(m->wall_message_timeout_source);
         m->nologin_timeout_source = sd_event_source_unref(m->nologin_timeout_source);
-        free(m->scheduled_shutdown_type);
-        m->scheduled_shutdown_type = NULL;
+        m->scheduled_shutdown_type = mfree(m->scheduled_shutdown_type);
         m->scheduled_shutdown_timeout = 0;
 
         if (cancelled) {