diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c index 6f3ace993..0a70e22f7 100644 --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c @@ -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); }