]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/libsystemd/sd-bus/bus-slot.c
tree-wide: use mfree more
[thirdparty/systemd.git] / src / libsystemd / sd-bus / bus-slot.c
index a8c74011bf9baa6b4ed22ffb1d7c506612879f06..33590c31ac78764e23fc6da859ba97c92d77c194 100644 (file)
@@ -206,15 +206,13 @@ _public_ sd_bus_slot* sd_bus_slot_unref(sd_bus_slot *slot) {
         assert(slot->n_ref > 0);
 
         if (slot->n_ref > 1) {
-                slot->n_ref --;
+                slot->n_ref--;
                 return NULL;
         }
 
         bus_slot_disconnect(slot);
         free(slot->description);
-        free(slot);
-
-        return NULL;
+        return mfree(slot);
 }
 
 _public_ sd_bus* sd_bus_slot_get_bus(sd_bus_slot *slot) {