From: Rafał Miłecki Date: Mon, 20 Mar 2017 11:54:50 +0000 (+0100) Subject: Drop entries cached for interface we're going to delete X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fmdnsd.git;a=commitdiff_plain;h=e1bacef27d869234149951cc7f4c9d3e0d8f07ad Drop entries cached for interface we're going to delete Since we free memory with struct interface we can't keep referencing/using it in cached records or services. Signed-off-by: Rafał Miłecki Acked-by: John Crispin --- diff --git a/interface.c b/interface.c index a09e7ce..cde184b 100644 --- a/interface.c +++ b/interface.c @@ -34,6 +34,7 @@ #include #include #include +#include "cache.h" #include "interface.h" #include "util.h" #include "dns.h" @@ -519,6 +520,7 @@ iface_update_cb(struct vlist_tree *tree, struct vlist_node *node_new, if (node_old) { iface = container_of(node_old, struct interface, node); + cache_cleanup(iface); interface_free(iface); }