diff options
author | Thomas Haller <thaller@redhat.com> | 2020-04-15 12:01:09 (GMT) |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2020-04-15 16:42:38 (GMT) |
commit | 2957d8f6c8bf1189545a7b0c1a49c4ccb26984a1 (patch) | |
tree | 78ee9a158724ab54067a432a201f5b4f65c871cf /lib/route | |
parent | 77b4f68999f280fc42035d620bf600d6a1e2da3f (diff) | |
download | libnl-2957d8f6c8bf1189545a7b0c1a49c4ccb26984a1.zip libnl-2957d8f6c8bf1189545a7b0c1a49c4ccb26984a1.tar.gz libnl-2957d8f6c8bf1189545a7b0c1a49c4ccb26984a1.tar.bz2 |
rtnl/link: fix leaking rtnl_link_af_ops in link_msg_parser()
Diffstat (limited to 'lib/route')
-rw-r--r-- | lib/route/link.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/route/link.c b/lib/route/link.c index 0ce4b0a..b73a8c5 100644 --- a/lib/route/link.c +++ b/lib/route/link.c @@ -722,6 +722,8 @@ static int link_msg_parser(struct nl_cache_ops *ops, struct sockaddr_nl *who, int remaining; nla_for_each_nested(af_attr, tb[IFLA_AF_SPEC], remaining) { + _nl_auto_rtnl_link_af_ops struct rtnl_link_af_ops *af_ops = NULL; + af_ops = af_lookup_and_alloc(link, nla_type(af_attr)); if (af_ops && af_ops->ao_parse_af) { char *af_data = link->l_af_data[nla_type(af_attr)]; |