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 <rafal@milecki.pl>
Acked-by: John Crispin <john@phrozen.org>
#include <libubox/uloop.h>
#include <libubox/avl-cmp.h>
#include <libubox/utils.h>
+#include "cache.h"
#include "interface.h"
#include "util.h"
#include "dns.h"
if (node_old) {
iface = container_of(node_old, struct interface, node);
+ cache_cleanup(iface);
interface_free(iface);
}