nl80211: Clear connect command message buffer
This command can include keys (WEP or PSK for offload), so the message buffer needs to be cleared explicitly after use to avoid leaving such material in heap memory unnecessarily. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
This commit is contained in:
parent
b14e8ea1d2
commit
0fa33e05b4
1 changed files with 4 additions and 2 deletions
|
@ -5716,9 +5716,10 @@ skip_auth_type:
|
|||
goto fail;
|
||||
|
||||
if (nl_connect)
|
||||
ret = send_and_recv(drv->global, nl_connect, msg, NULL, NULL);
|
||||
ret = send_and_recv(drv->global, nl_connect, msg,
|
||||
NULL, (void *) -1);
|
||||
else
|
||||
ret = send_and_recv_msgs(drv, msg, NULL, NULL);
|
||||
ret = send_and_recv_msgs(drv, msg, NULL, (void *) -1);
|
||||
|
||||
msg = NULL;
|
||||
if (ret) {
|
||||
|
@ -5730,6 +5731,7 @@ skip_auth_type:
|
|||
}
|
||||
|
||||
fail:
|
||||
nl80211_nlmsg_clear(msg);
|
||||
nlmsg_free(msg);
|
||||
return ret;
|
||||
|
||||
|
|
Loading…
Reference in a new issue