Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

staging: vt6655: Fix memory leak in wpa_ioctl()

Fix a memory leak in the wpa_ioctl() error handling path so that 'param' is
also freed correctly in case of an unsupported ioctl.
Detected by Coverity: CID 144380.

Signed-off-by: Christian Engelmayer <cengelma@gmx.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Christian Engelmayer and committed by
Greg Kroah-Hartman
6d239874 075c457b

+2 -2
+2 -2
drivers/staging/vt6655/wpactl.c
··· 923 923 default: 924 924 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "wpa_ioctl: unknown cmd=%d\n", 925 925 param->cmd); 926 - return -EOPNOTSUPP; 927 - break; 926 + ret = -EOPNOTSUPP; 927 + goto out; 928 928 } 929 929 930 930 if ((ret == 0) && wpa_ioctl) {