chiark / gitweb /
sd-bus: properly handle removals of non-existing matches
authorLennart Poettering <lennart@poettering.net>
Wed, 29 Oct 2014 16:58:43 +0000 (17:58 +0100)
committerLennart Poettering <lennart@poettering.net>
Wed, 29 Oct 2014 16:58:43 +0000 (17:58 +0100)
src/libsystemd/sd-bus/bus-match.c

index 18afe0f..5658c61 100644 (file)
@@ -537,7 +537,7 @@ static int bus_match_find_compare_value(
         else if (BUS_MATCH_CAN_HASH(t))
                 n = hashmap_get(c->compare.children, value_str);
         else {
-                for (n = c->child; !value_node_same(n, t, value_u8, value_str); n = n->next)
+                for (n = c->child; n && !value_node_same(n, t, value_u8, value_str); n = n->next)
                         ;
         }