Cancel pending timeouts before freeing hosts
authorFelix Fietkau <nbd@openwrt.org>
Wed, 11 Aug 2010 16:41:43 +0000 (18:41 +0200)
committerFelix Fietkau <nbd@openwrt.org>
Wed, 11 Aug 2010 16:41:43 +0000 (18:41 +0200)
main.c

diff --git a/main.c b/main.c
index 48c594e47a9243c5a2dc2f6979bd14fdd8350712..81cc84db76e3ad224de63c47ba54aabf575e0efd 100644 (file)
--- a/main.c
+++ b/main.c
@@ -88,6 +88,7 @@ static void del_host(struct relayd_host *host)
 
        if (host->rif->managed)
                relayd_del_route(host);
+       uloop_timeout_cancel(&host->timeout);
        list_del(&host->list);
        free(host);
 }