From 820ea0ba934755bad1bdac3bca435312077906c3 Mon Sep 17 00:00:00 2001 From: Ankita Bajaj Date: Mon, 27 Aug 2018 13:01:13 +0530 Subject: [PATCH] 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 --- src/common/dpp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/common/dpp.c b/src/common/dpp.c index 099219c66..677f58692 100644 --- a/src/common/dpp.c +++ b/src/common/dpp.c @@ -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; } }