ip6: fix leak in process_addr()
authorThomas Graf <tgraf@redhat.com>
Fri, 9 Sep 2011 09:39:04 +0000 (11:39 +0200)
committerDan Williams <dcbw@redhat.com>
Tue, 13 Sep 2011 05:08:30 +0000 (00:08 -0500)
rtnladdr is leaked if nm_ip6_manager_get_device() returns NULL.

src/ip6-manager/nm-ip6-manager.c

index d882b00..f0dc7c3 100644 (file)
@@ -551,6 +551,7 @@ process_addr (NMIP6Manager *manager, struct nl_msg *msg)
        device = nm_ip6_manager_get_device (manager, rtnl_addr_get_ifindex (rtnladdr));
        if (!device) {
                nm_log_dbg (LOGD_IP6, "ignoring message for unknown device");
+               rtnl_addr_put (rtnladdr);
                return NULL;
        }