From e1bacef27d869234149951cc7f4c9d3e0d8f07ad Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rafa=C5=82=20Mi=C5=82ecki?= Date: Mon, 20 Mar 2017 12:54:50 +0100 Subject: [PATCH] Drop entries cached for interface we're going to delete MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- interface.c | 2 ++ 1 file changed, 2 insertions(+) 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); } -- 2.25.1