nl80211: Fix memory leak on start radar detection error path
Free nlmsg if failing to start radar detection. Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
This commit is contained in:
parent
ed8e005973
commit
dbdc9a1d48
1 changed files with 2 additions and 0 deletions
|
@ -11527,11 +11527,13 @@ static int nl80211_start_radar_detection(void *priv,
|
|||
goto nla_put_failure;
|
||||
|
||||
ret = send_and_recv_msgs(drv, msg, NULL, NULL);
|
||||
msg = NULL;
|
||||
if (ret == 0)
|
||||
return 0;
|
||||
wpa_printf(MSG_DEBUG, "nl80211: Failed to start radar detection: "
|
||||
"%d (%s)", ret, strerror(-ret));
|
||||
nla_put_failure:
|
||||
nlmsg_free(msg);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue