platform: fix memleak in build_rtnl_addr() using wrong put() method

'struct nl_addr' and 'struct nl_object' have non-compatible put()
functions.

(cherry picked from commit 76ba548959)
This commit is contained in:
Thomas Haller 2015-05-05 04:17:11 +02:00
parent 1588a14a8b
commit 4c9f0fc2ab

View file

@ -3553,7 +3553,7 @@ build_rtnl_addr (int family,
guint flags,
const char *label)
{
auto_nl_addr struct rtnl_addr *rtnladdr = _nm_rtnl_addr_alloc (ifindex);
auto_nl_object struct rtnl_addr *rtnladdr = _nm_rtnl_addr_alloc (ifindex);
struct rtnl_addr *rtnladdr_copy;
int addrlen = family == AF_INET ? sizeof (in_addr_t) : sizeof (struct in6_addr);
auto_nl_addr struct nl_addr *nladdr = _nm_nl_addr_build (family, addr, addrlen);