wireless: fix use-after-free bug
[project/netifd.git] / interface-ip.c
index 2280266..4edae2e 100644 (file)
@@ -15,7 +15,6 @@
 #include <string.h>
 #include <stdlib.h>
 #include <stdio.h>
-#include <unistd.h>
 
 #include <limits.h>
 #include <arpa/inet.h>
@@ -579,6 +578,7 @@ interface_update_proto_addr(struct vlist_tree *tree,
 
                        system_del_address(dev, a_old);
                }
+               free(a_old->pclass);
                free(a_old);
        }