]> git.ipfire.org Git - thirdparty/hostap.git/commit
nl80211: Fix memory leak on libnl nl_cb
authorJouni Malinen <quic_jouni@quicinc.com>
Mon, 22 Jan 2024 09:35:51 +0000 (11:35 +0200)
committerJouni Malinen <j@w1.fi>
Mon, 22 Jan 2024 09:35:51 +0000 (11:35 +0200)
commitfd71cae6c971ff98d9093342d36871d3cec03694
treea67684e711c943a9d3c56f0a6287a0a5bbe0732d
parent2814dbd6dbfc982fe7a2f888523de2b0f293ee3a
nl80211: Fix memory leak on libnl nl_cb

nl_socket_get_cb() increases cb_refcnf for the cb that is bound to a
socket and as such, nl_cb_put() needs to be used with the returned cb
after having cloned it to avoid leaking memory due to cb_refcnt never
getting back to 0.

Fixes: da0d51fee74b ("nl80211: Use socket cb instead of global->nl_cb in send_and_recv()")
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
src/drivers/driver_nl80211.c