config: make sure timer is not on the timeouts list before freeing
authorColin Whittaker <colin.whittaker@adtran.com>
Sat, 24 Jun 2023 20:33:12 +0000 (13:33 -0700)
committerKevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
Tue, 24 Oct 2023 15:50:02 +0000 (16:50 +0100)
Signed-off-by: Colin Whittaker <colin.whittaker@adtran.com>
Signed-off-by: Chad Monroe <chad@monroe.io>
src/config.c

index 5ba4d9ecd4dcbfc9e63d1a6ed534c520bfd201ef..1cd460808c3deea4f6865aa1525ec65b9dace31d 100644 (file)
@@ -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);