]> granicus.if.org Git - libnl/commit
route: fix handling old_nh in rtnl_route_parse() and avoid leak
authorThomas Haller <thaller@redhat.com>
Mon, 6 Nov 2017 14:04:14 +0000 (15:04 +0100)
committerThomas Haller <thaller@redhat.com>
Mon, 6 Nov 2017 14:08:25 +0000 (15:08 +0100)
commit1228a65963956300bd0466437530b975e0eaeec5
tree7c48db75762c40eb2dea1579f596aaeb56679fa2
parent56229168614a11897bd620c363e71aca3faf23ee
route: fix handling old_nh in rtnl_route_parse() and avoid leak

The previous code would miss to release old_nh in the error
path.

Also, it relied on the present netlink attributes to have old_nh
initialized. Don't do that.

Also, fixup error codes by using "goto errout_nomem" where appropriate
and keep @err as returned from rtnl_route_set_metric().
lib/route/route_obj.c