]> git.baikalelectronics.ru Git - kernel.git/commit
calipso: fix resource leak on calipso_genopt failure
authorColin Ian King <colin.king@canonical.com>
Thu, 11 Aug 2016 17:17:22 +0000 (18:17 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sat, 13 Aug 2016 21:56:17 +0000 (14:56 -0700)
commitcd7a0d86fa60a2dd82ca3f2a08e5ddbd40050256
treeec7aea76bd12aa927205b592f846f782cc8904d2
parent608dbc084278ceb90f1862343a70505bcf5d0e9b
calipso: fix resource leak on calipso_genopt failure

Currently, if calipso_genopt fails then the error exit path
does not free the ipv6_opt_hdr new causing a memory leak. Fix
this by kfree'ing new on the error exit path.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/calipso.c