|
@@ -862,10 +862,9 @@ wl_iw_get_aplist(struct net_device *dev,
|
|
if (!extra)
|
|
if (!extra)
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
|
|
|
|
- list = kmalloc(buflen, GFP_KERNEL);
|
|
|
|
|
|
+ list = kzalloc(buflen, GFP_KERNEL);
|
|
if (!list)
|
|
if (!list)
|
|
return -ENOMEM;
|
|
return -ENOMEM;
|
|
- memset(list, 0, buflen);
|
|
|
|
list->buflen = cpu_to_le32(buflen);
|
|
list->buflen = cpu_to_le32(buflen);
|
|
error = dev_wlc_ioctl(dev, WLC_SCAN_RESULTS, list, buflen);
|
|
error = dev_wlc_ioctl(dev, WLC_SCAN_RESULTS, list, buflen);
|
|
if (error) {
|
|
if (error) {
|
|
@@ -3667,11 +3666,10 @@ int wl_iw_attach(struct net_device *dev, void *dhdp)
|
|
params_size =
|
|
params_size =
|
|
(WL_SCAN_PARAMS_FIXED_SIZE + offsetof(wl_iscan_params_t, params));
|
|
(WL_SCAN_PARAMS_FIXED_SIZE + offsetof(wl_iscan_params_t, params));
|
|
#endif
|
|
#endif
|
|
- iscan = kmalloc(sizeof(iscan_info_t), GFP_KERNEL);
|
|
|
|
|
|
+ iscan = kzalloc(sizeof(iscan_info_t), GFP_KERNEL);
|
|
|
|
|
|
if (!iscan)
|
|
if (!iscan)
|
|
return -ENOMEM;
|
|
return -ENOMEM;
|
|
- memset(iscan, 0, sizeof(iscan_info_t));
|
|
|
|
|
|
|
|
iscan->iscan_ex_params_p = kmalloc(params_size, GFP_KERNEL);
|
|
iscan->iscan_ex_params_p = kmalloc(params_size, GFP_KERNEL);
|
|
if (!iscan->iscan_ex_params_p)
|
|
if (!iscan->iscan_ex_params_p)
|
|
@@ -3705,11 +3703,10 @@ int wl_iw_attach(struct net_device *dev, void *dhdp)
|
|
priv_dev = dev;
|
|
priv_dev = dev;
|
|
MUTEX_LOCK_SOFTAP_SET_INIT(iw->pub);
|
|
MUTEX_LOCK_SOFTAP_SET_INIT(iw->pub);
|
|
#endif
|
|
#endif
|
|
- g_scan = kmalloc(G_SCAN_RESULTS, GFP_KERNEL);
|
|
|
|
|
|
+ g_scan = kzalloc(G_SCAN_RESULTS, GFP_KERNEL);
|
|
if (!g_scan)
|
|
if (!g_scan)
|
|
return -ENOMEM;
|
|
return -ENOMEM;
|
|
|
|
|
|
- memset(g_scan, 0, G_SCAN_RESULTS);
|
|
|
|
g_scan_specified_ssid = 0;
|
|
g_scan_specified_ssid = 0;
|
|
|
|
|
|
return 0;
|
|
return 0;
|