From bbb6ff0216a7c081a2e63e01b1f121592b0165bb Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 14 Mar 2014 21:12:36 +0100 Subject: sd-bus: don't access invalid memory if a signal matcher was freed from its own callback --- src/libsystemd/sd-bus/bus-match.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/libsystemd/sd-bus') diff --git a/src/libsystemd/sd-bus/bus-match.c b/src/libsystemd/sd-bus/bus-match.c index 828048806f..c54ca8d71d 100644 --- a/src/libsystemd/sd-bus/bus-match.c +++ b/src/libsystemd/sd-bus/bus-match.c @@ -293,6 +293,9 @@ int bus_match_run( r = bus_maybe_reply_error(m, r, &error_buffer); if (r != 0) return r; + + if (bus && bus->match_callbacks_modified) + return 0; } return bus_match_run(bus, node->next, m); -- cgit v1.2.3-54-g00ecf