On 20/03/17 12:54, Rafał Miłecki wrote:
From: Rafał Miłecki <[email protected]>

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 <[email protected]>
Acked-by: John Crispin <[email protected]>

---
  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 <libubox/uloop.h>
  #include <libubox/avl-cmp.h>
  #include <libubox/utils.h>
+#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);
        }


_______________________________________________
Lede-dev mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/lede-dev

Reply via email to