From: Rafał Miłecki Date: Fri, 10 Mar 2017 10:49:44 +0000 (+0100) Subject: Cancel (re)connect timer when deleting interface X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=d4376788601c38963c4c836d325e3a66498079ea;p=project%2Fmdnsd.git Cancel (re)connect timer when deleting interface Firing timeout would cause a crash if interface has been deleted meanwhile. The easiest way to trigger this was calling set_config ubus method twice within 100 ms. Cancel pending interface start before freeing it. Signed-off-by: Rafał Miłecki --- diff --git a/interface.c b/interface.c index f9fe40a..a09e7ce 100644 --- a/interface.c +++ b/interface.c @@ -153,6 +153,7 @@ static void interface_close(struct interface *iface) static void interface_free(struct interface *iface) { + uloop_timeout_cancel(&iface->reconnect); interface_close(iface); free(iface); }