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@xxxxxx> --- drivers/staging/vt6655/wpactl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/vt6655/wpactl.c b/drivers/staging/vt6655/wpactl.c index 044368a..2315d67 100644 --- a/drivers/staging/vt6655/wpactl.c +++ b/drivers/staging/vt6655/wpactl.c @@ -923,8 +923,8 @@ int wpa_ioctl(PSDevice pDevice, struct iw_point *p) default: DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "wpa_ioctl: unknown cmd=%d\n", param->cmd); - return -EOPNOTSUPP; - break; + ret = -EOPNOTSUPP; + goto out; } if ((ret == 0) && wpa_ioctl) { -- 1.8.3.2 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel