diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2018-11-28 14:55:13 +0100 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2018-12-02 12:18:54 +0100 |
commit | bb1a05d6f34b6f17ac1b6b49c93ec0f8f97dfce7 (patch) | |
tree | 72e82d880df074f57fd6f71593806d16aac4b3b2 /src/machine/machine.c | |
parent | machine-image: introduce image_hash_ops and use it (diff) | |
download | systemd-bb1a05d6f34b6f17ac1b6b49c93ec0f8f97dfce7.tar.xz systemd-bb1a05d6f34b6f17ac1b6b49c93ec0f8f97dfce7.zip |
machine: introduce machine_hash_ops and use it
Diffstat (limited to 'src/machine/machine.c')
-rw-r--r-- | src/machine/machine.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/machine/machine.c b/src/machine/machine.c index e114541b3f..c76dfc1846 100644 --- a/src/machine/machine.c +++ b/src/machine/machine.c @@ -70,8 +70,9 @@ fail: return mfree(m); } -void machine_free(Machine *m) { - assert(m); +Machine* machine_free(Machine *m) { + if (!m) + return NULL; while (m->operations) operation_free(m->operations); @@ -98,7 +99,7 @@ void machine_free(Machine *m) { free(m->service); free(m->root_directory); free(m->netif); - free(m); + return mfree(m); } int machine_save(Machine *m) { |