nl80211: Clear PMKID add command message buffer

This command has now been extended to include PMK for offload needs, so
the message buffer needs to be cleared explicitly after use to avoid
leaving such material in heap memory unnecessarily.

Fixes: 061a3d3d53 ("nl80211: Add support for FILS Cache Identifier in add/remove_pmkid()")
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
This commit is contained in:
Jouni Malinen 2019-02-05 20:36:28 +02:00 committed by Jouni Malinen
parent 0fa33e05b4
commit 6110753b18

View file

@ -7929,11 +7929,12 @@ static int nl80211_pmkid(struct i802_bss *bss, int cmd,
params->fils_cache_id)) ||
(params->pmk_len && params->pmk_len <= PMK_MAX_LEN &&
nla_put(msg, NL80211_ATTR_PMK, params->pmk_len, params->pmk))) {
nl80211_nlmsg_clear(msg);
nlmsg_free(msg);
return -ENOBUFS;
}
return send_and_recv_msgs(bss->drv, msg, NULL, NULL);
return send_and_recv_msgs(bss->drv, msg, NULL, (void *) -1);
}