core: fix leaked address structure after parsing mac address

This commit is contained in:
Thomas Graf 2011-09-09 11:39:08 +02:00 committed by Dan Williams
parent 1134eee1e6
commit 360143e42f

View file

@ -758,6 +758,7 @@ nm_system_iface_set_mac (int ifindex, const struct ether_addr *mac)
return FALSE;
}
rtnl_link_set_addr (new, addr);
nl_addr_put (addr);
nlh = nm_netlink_get_default_handle ();
if (nlh) {
err = rtnl_link_change (nlh, old, new, 0);