提交 721b79d1 编写于 作者: C Christian Engelmayer 提交者: Greg Kroah-Hartman

staging: vt6656: fix potential leak in vt6656_hostap_ioctl()

Commit fb841d67 (staging: vt6656: don't leak 'param' in vt6656_hostap_ioctl()
when returning -EOPNOTSUPP) cleaned up direct returns in the ioctl switch
statement that leaked already allocated memory. Fix the same issue for
VIAWGET_HOSTAPD_SCAN_REQ and VIAWGET_HOSTAPD_MLME that are not supported by
this driver. Detected by Coverity - CID 144381.
Signed-off-by: NChristian Engelmayer <cengelma@gmx.at>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 62a3f8a1
......@@ -742,7 +742,8 @@ int vt6656_hostap_ioctl(struct vnt_private *pDevice, struct iw_point *p)
case VIAWGET_HOSTAPD_MLME:
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "VIAWGET_HOSTAPD_MLME \n");
return -EOPNOTSUPP;
ret = -EOPNOTSUPP;
goto out;
case VIAWGET_HOSTAPD_SET_GENERIC_ELEMENT:
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "VIAWGET_HOSTAPD_SET_GENERIC_ELEMENT \n");
......@@ -751,7 +752,8 @@ int vt6656_hostap_ioctl(struct vnt_private *pDevice, struct iw_point *p)
case VIAWGET_HOSTAPD_SCAN_REQ:
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "VIAWGET_HOSTAPD_SCAN_REQ \n");
return -EOPNOTSUPP;
ret = -EOPNOTSUPP;
goto out;
case VIAWGET_HOSTAPD_STA_CLEAR_STATS:
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "VIAWGET_HOSTAPD_STA_CLEAR_STATS \n");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册