DPP: Fix a memory leak on Configurator keygen error path

The allocated configuration structure needs to be freed if the specified
curve is not supported.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
This commit is contained in:
Ankita Bajaj 2018-08-27 13:01:13 +05:30 committed by Jouni Malinen
parent 5a052f92eb
commit 820ea0ba93

View file

@ -5564,6 +5564,7 @@ dpp_keygen_configurator(const char *curve, const u8 *privkey,
if (!conf->curve) {
wpa_printf(MSG_INFO, "DPP: Unsupported curve: %s",
curve);
os_free(conf);
return NULL;
}
}