Explorar o código

net/wireless/wext-core.c: add missing kfree

Free extra as done in the error-handling code just above.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Julia Lawall %!s(int64=13) %!d(string=hai) anos
pai
achega
7ab2485b69
Modificáronse 1 ficheiros con 4 adicións e 2 borrados
  1. 4 2
      net/wireless/wext-core.c

+ 4 - 2
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;
+			}
 		}
 	}