chiark / gitweb /
Prep v234: Update root build files to upstream.
[elogind.git] / src / libelogind / sd-bus / bus-slot.c
index c08ff5f51cceeea02946c64d6dce9aa2aaed7ea0..cd5e9767470906d25ee7f37e93f344e508616f53 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);
 }
 
 #if 0 /// UNNEEDED by elogind