ui: address potential memory leak
authorPauli <pauli@openssl.org>
Fri, 25 Jun 2021 02:56:01 +0000 (12:56 +1000)
committerPauli <pauli@openssl.org>
Sat, 26 Jun 2021 01:33:52 +0000 (11:33 +1000)
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/15910)

crypto/ui/ui_lib.c

index fd03dc6cd06aa9678893daf62d56f745914ab962..7cb91add41991e85a83fbe3478aa5fe311f41b26 100644 (file)
@@ -43,7 +43,7 @@ UI *UI_new_method(const UI_METHOD *method)
     ret->meth = method;
 
     if (!CRYPTO_new_ex_data(CRYPTO_EX_INDEX_UI, ret, &ret->ex_data)) {
-        OPENSSL_free(ret);
+        UI_free(ret);
         return NULL;
     }
     return ret;