]> git.ipfire.org Git - thirdparty/hostap.git/commit
EAP-pwd peer: Fix memory leak in eap_pwd_perform_confirm_exchange()
authorNishant Chaprana <n.chaprana@samsung.com>
Tue, 21 Aug 2018 11:37:51 +0000 (17:07 +0530)
committerJouni Malinen <j@w1.fi>
Tue, 16 Oct 2018 09:11:32 +0000 (12:11 +0300)
commit391d922bcfcbb92e78b558fc7892f51c50929ba2
treebbf5929de768548d1fb911d852b5c2f5c7b9ccdf
parent30a67736dc7a2ff9594619384ac13b946669c366
EAP-pwd peer: Fix memory leak in eap_pwd_perform_confirm_exchange()

hash variable is allocated memory using eap_pwd_h_init(), but there are
couple of error case code paths which skips deallocation of hash. The
memory of hash is deallocated using eap_pwd_h_final(). Fix this by
calling eap_pwd_h_final() at the end of the function if execution got
there through one of those error cases.

Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
src/eap_peer/eap_pwd.c