]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
DPP: Fix a memory leak on Configurator keygen error path
authorAnkita Bajaj <bankita@codeaurora.org>
Mon, 27 Aug 2018 07:31:13 +0000 (13:01 +0530)
committerJouni Malinen <j@w1.fi>
Fri, 21 Sep 2018 18:22:42 +0000 (21:22 +0300)
The allocated configuration structure needs to be freed if the specified
curve is not supported.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
src/common/dpp.c

index 099219c66b41dcf5d1ff36ad7857e76c99eb83cc..677f586929f329e756bc90b05f3af9d24691798c 100644 (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;
                }
        }