From: Yu Watanabe Date: Tue, 28 Sep 2021 06:41:19 +0000 (+0900) Subject: sd-lldp-rx: sd_event should be attached when lldp_rx_start_timer() is called X-Git-Tag: v250-rc1~612^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=92466b8da2d868cabf6237fe0f6a8e8151a4cebf;p=thirdparty%2Fsystemd.git sd-lldp-rx: sd_event should be attached when lldp_rx_start_timer() is called --- diff --git a/src/libsystemd-network/sd-lldp-rx.c b/src/libsystemd-network/sd-lldp-rx.c index af4bd627625..05dec99d510 100644 --- a/src/libsystemd-network/sd-lldp-rx.c +++ b/src/libsystemd-network/sd-lldp-rx.c @@ -426,6 +426,7 @@ static int lldp_rx_start_timer(sd_lldp_rx *lldp_rx, sd_lldp_neighbor *neighbor) sd_lldp_neighbor *n; assert(lldp_rx); + assert(lldp_rx->event); if (neighbor) lldp_neighbor_start_ttl(neighbor); @@ -434,9 +435,6 @@ static int lldp_rx_start_timer(sd_lldp_rx *lldp_rx, sd_lldp_neighbor *neighbor) if (!n) return event_source_disable(lldp_rx->timer_event_source); - if (!lldp_rx->event) - return 0; - return event_reset_time(lldp_rx->event, &lldp_rx->timer_event_source, clock_boottime_or_monotonic(), n->until, 0,