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

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

index fb9e77b..d882b00 100644 (file)
@@ -591,6 +591,7 @@ process_route (NMIP6Manager *manager, struct nl_msg *msg)
        device = nm_ip6_manager_get_device (manager, rtnl_route_get_oif (rtnlroute));
        if (!device) {
                nm_log_dbg (LOGD_IP6, "ignoring message for unknown device");
+               rtnl_route_put (rtnlroute);
                return NULL;
        }