Browse Source

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>
Colin Whittaker 10 months ago
parent
commit
d8118f6e76
1 changed files with 3 additions and 0 deletions
  1. 3 0
      src/config.c

+ 3 - 0
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);