staging: wilc1000: fix incorrect allocation size for structure
authorColin Ian King <colin.king@canonical.com>
Thu, 27 Sep 2018 12:17:49 +0000 (13:17 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 28 Sep 2018 12:30:52 +0000 (14:30 +0200)
commit8f6b8ed3b02e3202b062a0d786c1c623f64cad63
tree63c045d16cf477c35a2569f72090a6a6f69608ad
parent96e47e30c0bce708b975af6e0fca4a6eaed5ee75
staging: wilc1000: fix incorrect allocation size for structure

Currently the allocation for str_vals is for the sizeof the pointer
rather than the size of the structure.  Fix this.

Detected by smatch
"wilc_wlan_cfg_init() error: not allocating enough data 392 vs 8"

Fixes: acceb12a9f8b ("staging: wilc1000: refactor code to avoid static variables for config parameters")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wilc1000/wilc_wlan_cfg.c