summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Whittaker2023-06-24 20:33:12 +0000
committerKevin Darbyshire-Bryant2023-10-24 15:50:02 +0000
commitd8118f6e76e5519881f9a37137c3a06b3cb60fd2 (patch)
tree23367ae58d10a42506b68ffcbbd15982bdfb9a07
parent4bbc6e74248feeb756bd03dc500fb4f446ccfc49 (diff)
downloadodhcpd-d8118f6e76e5519881f9a37137c3a06b3cb60fd2.tar.gz
config: make sure timer is not on the timeouts list before freeing
Signed-off-by: Colin Whittaker <colin.whittaker@adtran.com> Signed-off-by: Chad Monroe <chad@monroe.io>
-rw-r--r--src/config.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/config.c b/src/config.c
index 5ba4d9e..1cd4608 100644
--- a/src/config.c
+++ b/src/config.c
@@ -259,6 +259,9 @@ static void close_interface(struct interface *iface)
dhcpv4_setup_interface(iface, false);
#endif
+ /* make sure timer is not on the timeouts list before freeing */
+ uloop_timeout_cancel(&iface->timer_rs);
+
clean_interface(iface);
free(iface->addr4);
free(iface->addr6);