summaryrefslogtreecommitdiff
path: root/src/core/manager.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/manager.c')
-rw-r--r--src/core/manager.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/manager.c b/src/core/manager.c
index 7abc8a9a5e..4c3264b373 100644
--- a/src/core/manager.c
+++ b/src/core/manager.c
@@ -889,11 +889,12 @@ static void manager_clear_jobs_and_units(Manager *m) {
m->n_running_jobs = 0;
}
-void manager_free(Manager *m) {
+Manager* manager_free(Manager *m) {
UnitType c;
int i;
- assert(m);
+ if (!m)
+ return NULL;
manager_clear_jobs_and_units(m);
@@ -955,6 +956,7 @@ void manager_free(Manager *m) {
hashmap_free(m->units_requiring_mounts_for);
free(m);
+ return NULL;
}
int manager_enumerate(Manager *m) {