Re: [PATCH 2/2] net: team: fix memory leak in team_nl_send_options_get

2017-04-24 Thread Jiri Pirko
Mon, Apr 24, 2017 at 09:04:55AM CEST, bianpan2...@163.com wrote: >In function team_nl_send_options_get(), pointer skb keeps the return >value of function nlmsg_new(). When the call to genlmsg_put() fails, the >control flow directly returns and does not free skb. This will result in >a memory leak b

[PATCH 2/2] net: team: fix memory leak in team_nl_send_options_get

2017-04-24 Thread Pan Bian
In function team_nl_send_options_get(), pointer skb keeps the return value of function nlmsg_new(). When the call to genlmsg_put() fails, the control flow directly returns and does not free skb. This will result in a memory leak bug. This patch fixes it. Fixes: 8ea7fd0d8792 ("team: fix memory leak