bus: add assert to check that we're not freeing a static structure
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sun, 5 Oct 2014 18:04:02 +0000 (14:04 -0400)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sun, 5 Oct 2014 19:29:41 +0000 (15:29 -0400)
CID #996315.

src/libsystemd/sd-bus/sd-bus.c

index 28b993b..bc4376f 100644 (file)
@@ -142,6 +142,7 @@ static void bus_free(sd_bus *b) {
         hashmap_free_free(b->reply_callbacks);
         prioq_free(b->reply_callbacks_prioq);
 
+        assert(b->match_callbacks.type == BUS_MATCH_ROOT);
         bus_match_free(&b->match_callbacks);
 
         hashmap_free_free(b->vtable_methods);