]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit165f09a56739c4804d769b80f1c7bed974fee86d
tree63c045d16cf477c35a2569f72090a6a6f69608ad
parentaaa1d95752f61c16b255f1c8fac3e1fadbb3992d
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: 59f743004cf6 ("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