diff --git a/libwifi/modules/broadcom/wlctrl.c b/libwifi/modules/broadcom/wlctrl.c
index ddb7489a87987dc1daec762c538295ef91782f47..3a5735eb2a2672e0f7e4c5690039d8cc5b8316f5 100644
--- a/libwifi/modules/broadcom/wlctrl.c
+++ b/libwifi/modules/broadcom/wlctrl.c
@@ -2970,7 +2970,7 @@ int bcmwl_radio_get_oper_rates(const char *name, int *num, uint32_t *rates)
int bcmwl_radio_get_diag(const char *name, struct wifi_radio_diagnostic *diag)
{
- wl_chanim_stats_t param;
+ wl_chanim_stats_t param = { 0 };
wl_chanim_stats_t *chanim;
chanim_stats_t *stats;
char buf[WL_CHANIM_BUF_LEN] = { 0 };
diff --git a/libwifi/modules/nlwifi/nlwifi.c b/libwifi/modules/nlwifi/nlwifi.c
index de37afaee17b6c53d7808739d44f9997ca17b411..26216a10d39a86a8515d43283b09825a276fc544 100644
--- a/libwifi/modules/nlwifi/nlwifi.c
+++ b/libwifi/modules/nlwifi/nlwifi.c
@@ -129,8 +129,8 @@ int nlwifi_phy_to_netdev(const char *phy, char *netdev, size_t size)
int nlwifi_phy_to_netdev_with_type(const char *phy, char *netdev, size_t size, uint32_t type)
{
- char path[256];
- char rphy[256] = {};
+ char path[256] = {0};
+ char rphy[256] = {0};
char netdevphy[256] = {0};
struct dirent *p;
int ret = -1;
@@ -195,9 +195,9 @@ int nlwifi_phy_to_netdev_with_type(const char *phy, char *netdev, size_t size, u
static int nlwifi_get_phy(const char *name, char *phy, size_t phy_size)
{
int fd;
- char path[256];
- char buf[512];
- int index;
+ char path[256] = {0};
+ char buf[512] = {0};
+ int index = 0;
if (strstr(name, "phy")) {
strncpy(phy, name, phy_size);