ipconfig: Clear the ipaddress pointers when address is deleted
authorJukka Rissanen <jukka.rissanen@nokia.com>
Thu, 10 Feb 2011 15:52:10 +0000 (17:52 +0200)
committerSamuel Ortiz <sameo@linux.intel.com>
Fri, 11 Feb 2011 11:20:59 +0000 (12:20 +0100)
src/ipconfig.c

index 6ef39c5..bd664f3 100644 (file)
@@ -682,7 +682,8 @@ void __connman_ipconfig_deladdr(int index, int family, const char *label,
        ipdevice->address_list = g_slist_remove(ipdevice->address_list,
                                                                ipaddress);
 
-       connman_ipaddress_free(ipaddress);
+       connman_ipaddress_clear(ipaddress);
+       g_free(ipaddress);
 
        connman_info("%s {del} address %s/%u label %s", ipdevice->ifname,
                                                address, prefixlen, label);