From: Julia Lawall Date: Mon, 9 Apr 2012 09:01:09 +0000 (+0200) Subject: net/wireless/wext-core.c: add missing kfree X-Git-Tag: accepted/tizen/common/20141203.182822~4724^2~8^2~36 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7ab2485b69571a3beb0313c591486626c3374c85;p=platform%2Fkernel%2Flinux-arm64.git net/wireless/wext-core.c: add missing kfree Free extra as done in the error-handling code just above. Signed-off-by: Julia Lawall Signed-off-by: John W. Linville --- diff --git a/net/wireless/wext-core.c b/net/wireless/wext-core.c index 0af7f54..af648e0 100644 --- a/net/wireless/wext-core.c +++ b/net/wireless/wext-core.c @@ -780,8 +780,10 @@ static int ioctl_standard_iw_point(struct iw_point *iwp, unsigned int cmd, if (cmd == SIOCSIWENCODEEXT) { struct iw_encode_ext *ee = (void *) extra; - if (iwp->length < sizeof(*ee) + ee->key_len) - return -EFAULT; + if (iwp->length < sizeof(*ee) + ee->key_len) { + err = -EFAULT; + goto out; + } } }