From 41e57d5a8821d0151ed02bfa5635043eb5ff25cb Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Tue, 13 Aug 2013 22:01:05 +0200 Subject: [PATCH] lldpd: fix a segfault when a port disappear Due to previous recent change, a NULL function could be called when a port disappear. Fix that. --- src/lldpd-structs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lldpd-structs.c b/src/lldpd-structs.c index 376da989..5c907f0d 100644 --- a/src/lldpd-structs.c +++ b/src/lldpd-structs.c @@ -130,7 +130,7 @@ lldpd_remote_cleanup(struct lldpd_hardware *hardware, del = 1; } if (del) { - expire(hardware, port); + if (expire) expire(hardware, port); TAILQ_REMOVE(&hardware->h_rports, port, p_entries); lldpd_port_cleanup(port, 1); free(port); -- 2.39.5