From: Lennart Poettering Date: Wed, 29 Oct 2014 16:58:43 +0000 (+0100) Subject: sd-bus: properly handle removals of non-existing matches X-Git-Tag: v218~673 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=ef7b6c0190fefaacf6d8f8e1a6dda4ba8b98091b sd-bus: properly handle removals of non-existing matches --- diff --git a/src/libsystemd/sd-bus/bus-match.c b/src/libsystemd/sd-bus/bus-match.c index 18afe0f12..5658c61ba 100644 --- a/src/libsystemd/sd-bus/bus-match.c +++ b/src/libsystemd/sd-bus/bus-match.c @@ -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) ; }