chiark / gitweb /
Fix service file to match installed elogind binary location
[elogind.git] / src / libelogind / sd-bus / bus-slot.c
index c08ff5f51cceeea02946c64d6dce9aa2aaed7ea0..33590c31ac78764e23fc6da859ba97c92d77c194 100644 (file)
@@ -206,18 +206,15 @@ _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
 _public_ sd_bus* sd_bus_slot_get_bus(sd_bus_slot *slot) {
         assert_return(slot, NULL);
 
@@ -285,4 +282,3 @@ _public_ int sd_bus_slot_get_description(sd_bus_slot *slot, const char **descrip
         *description = slot->description;
         return 0;
 }
-#endif // 0