summaryrefslogtreecommitdiffstats
path: root/lib/route
diff options
context:
space:
mode:
authorDavid Ahern <dsa@cumulusnetworks.com>2017-09-21 01:35:04 (GMT)
committerThomas Haller <thaller@redhat.com>2017-09-21 11:25:22 (GMT)
commit1ba35cc5162b3da1ff7349c03743d4d59cffa801 (patch)
tree8b08124bd2e122f428a254234606be3f1f21d4d4 /lib/route
parente01b9df629e2f4f833fdc4fe0bda460bb738d136 (diff)
downloadlibnl-1ba35cc5162b3da1ff7349c03743d4d59cffa801.zip
libnl-1ba35cc5162b3da1ff7349c03743d4d59cffa801.tar.gz
libnl-1ba35cc5162b3da1ff7349c03743d4d59cffa801.tar.bz2
netconf: Put nc reference in msg_parser
netconf_msg_parser is leaking memory. Add the put in the newly allocated nc object to release the initial reference. Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com> Signed-off-by: David Ahern <dsa@cumulusnetworks.com> http://lists.infradead.org/pipermail/libnl/2017-September/002378.html
Diffstat (limited to 'lib/route')
-rw-r--r--lib/route/netconf.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/route/netconf.c b/lib/route/netconf.c
index 0635dd7..1d48c40 100644
--- a/lib/route/netconf.c
+++ b/lib/route/netconf.c
@@ -173,7 +173,10 @@ static int netconf_msg_parser(struct nl_cache_ops *ops, struct sockaddr_nl *who,
nc->ce_mask |= NETCONF_ATTR_INPUT;
}
- return pp->pp_cb((struct nl_object *) nc, pp);
+ err = pp->pp_cb((struct nl_object *) nc, pp);
+
+ rtnl_netconf_put(nc);
+ return err;
}
static int netconf_request_update(struct nl_cache *cache, struct nl_sock *sk)