From: Mike Yuan Date: Fri, 21 Feb 2025 15:45:34 +0000 (+0100) Subject: sd-event: assert on hashmap_remove(child.pid) X-Git-Tag: v258-rc1~1272^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4f63673482000c06478d3dd655415f8348928723;p=thirdparty%2Fsystemd.git sd-event: assert on hashmap_remove(child.pid) Follow-up for 54988a27b9d1487e1690f94b79031ef61edd6651 and a342c71d360e083b3f6b06a64d852c4e3aceeef3 --- diff --git a/src/libsystemd/sd-event/sd-event.c b/src/libsystemd/sd-event/sd-event.c index f2abbb1b516..1fea7d5aa78 100644 --- a/src/libsystemd/sd-event/sd-event.c +++ b/src/libsystemd/sd-event/sd-event.c @@ -988,7 +988,7 @@ static void source_disconnect(sd_event_source *s) { s->event->n_online_child_sources--; } - (void) hashmap_remove(s->event->child_sources, PID_TO_PTR(s->child.pid)); + assert_se(hashmap_remove(s->event->child_sources, PID_TO_PTR(s->child.pid))); } if (EVENT_SOURCE_WATCH_PIDFD(s))