memoryleak: remove the element when not needed
authorJukka Rissanen <jukka.rissanen@nokia.com>
Fri, 31 Dec 2010 09:57:14 +0000 (11:57 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Fri, 31 Dec 2010 18:12:07 +0000 (10:12 -0800)
src/ipv4.c

index da115ed..c864c72 100644 (file)
@@ -147,6 +147,8 @@ static void ipv4_remove(struct connman_element *element)
        if ((__connman_inet_modify_address(RTM_DELADDR, 0, element->index,
                        AF_INET, address, peer, prefixlen, broadcast) < 0))
                DBG("address removal failed");
+
+       connman_element_unref(element);
 }
 
 static struct connman_driver ipv4_driver = {