]> git.ipfire.org Git - thirdparty/hostap.git/commit
DPP2: Fix error path handling in enterprise provisioning
authorJouni Malinen <jouni@codeaurora.org>
Mon, 2 Nov 2020 14:52:01 +0000 (16:52 +0200)
committerJouni Malinen <j@w1.fi>
Mon, 2 Nov 2020 14:52:01 +0000 (16:52 +0200)
commit3d490296bcdb6221e0e00b1c3ca3ca2f3ff444bf
tree219dfa92f60dd7b3b7106e4dfa3127e11e32c0ec
parentf724dd1bfd60eff27a395a00bae7ae32429856d6
DPP2: Fix error path handling in enterprise provisioning

The allocated memory pointed by the pem pointer was freed on an error
path without clearing the pointer to NULL before returning it from the
function. This could have resulted in use of freed memory in an error
case. Fix this by clearing the pointer so that the function returns NULL
properly in the case of this error.

Fixes: ace3723d9879 ("DPP2: Enterprise provisioning (Enrollee)")
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
src/common/dpp_crypto.c