diff options
author | Finikssky <finikssky@yandex.ru> | 2020-07-16 06:36:45 (GMT) |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2022-03-04 11:38:30 (GMT) |
commit | bfee88b8b0a924404b15a88c734bf5a45d23d012 (patch) | |
tree | 4d79e16930c33cdab4adbf26b356164272eca44c /lib/route | |
parent | 431ba835f950e47520471634973a3690fbd261d1 (diff) | |
download | libnl-bfee88b8b0a924404b15a88c734bf5a45d23d012.zip libnl-bfee88b8b0a924404b15a88c734bf5a45d23d012.tar.gz libnl-bfee88b8b0a924404b15a88c734bf5a45d23d012.tar.bz2 |
route: fix memory leak of l_info_ops in link_msg_parser()
[thaller@redhat.com: whitespace fix]
https://github.com/thom311/libnl/pull/254
Diffstat (limited to 'lib/route')
-rw-r--r-- | lib/route/link.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/route/link.c b/lib/route/link.c index b330755..ad96f65 100644 --- a/lib/route/link.c +++ b/lib/route/link.c @@ -653,6 +653,9 @@ static int link_msg_parser(struct nl_cache_ops *ops, struct sockaddr_nl *who, tb[IFLA_PROTINFO] = (struct nlattr *)link->l_af_ops->ao_protinfo_policy; } + if (link->l_info_ops) + release_link_info(link); + ops = rtnl_link_info_ops_lookup(kind); link->l_info_ops = ops; |