]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
job: update job_free() to follow our usual return-NULL style
authorLennart Poettering <lennart@poettering.net>
Mon, 10 Dec 2018 17:52:11 +0000 (18:52 +0100)
committerLennart Poettering <lennart@poettering.net>
Wed, 12 Dec 2018 10:14:26 +0000 (11:14 +0100)
src/core/job.c
src/core/job.h

index af5070b8cf9acb3c3802b4fe0bdf0ef5e4be9ab5..0f224f2691b5460126ae1660ca057b80ff8cb252 100644 (file)
@@ -89,7 +89,7 @@ void job_unlink(Job *j) {
         j->timer_event_source = sd_event_source_unref(j->timer_event_source);
 }
 
-void job_free(Job *j) {
+Job* job_free(Job *j) {
         assert(j);
         assert(!j->installed);
         assert(!j->transaction_prev);
@@ -102,7 +102,7 @@ void job_free(Job *j) {
         sd_bus_track_unref(j->bus_track);
         strv_free(j->deserialized_clients);
 
-        free(j);
+        return mfree(j);
 }
 
 static void job_set_state(Job *j, JobState state) {
index 5f9c14012ff92b22f54f5d387c8ade4ace422a74..1f5bce85a476ca61e7ebeae0521366645b7eaa1a 100644 (file)
@@ -162,7 +162,7 @@ struct Job {
 Job* job_new(Unit *unit, JobType type);
 Job* job_new_raw(Unit *unit);
 void job_unlink(Job *job);
-void job_free(Job *job);
+Job* job_free(Job *job);
 Job* job_install(Job *j);
 int job_install_deserialized(Job *j);
 void job_uninstall(Job *j);