]> git.baikalelectronics.ru Git - kernel.git/commit
mpls: fix mpls_net_init memory leak
authorNikolay Aleksandrov <nikolay@cumulusnetworks.com>
Mon, 31 Aug 2015 17:44:19 +0000 (10:44 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 31 Aug 2015 19:45:09 +0000 (12:45 -0700)
commit5b8dd18da700dbf048a957c1821ad3f525f5de34
tree313f0bacf4abc9db2c8063463335747f9cd76bec
parentaa6f7360704334ece7a7f8ce19e0de4f1c19bfba
mpls: fix mpls_net_init memory leak

Fix a memory leak in the mpls netns init function in case of failure. If
register_net_sysctl fails then we need to free the ctl_table.

Fixes: e420ba745219 ("mpls: Add a sysctl to control the size of the mpls label table")
Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/mpls/af_mpls.c