summaryrefslogtreecommitdiffstats
path: root/crypto/ui
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/ui')
-rw-r--r--crypto/ui/ui_lib.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/crypto/ui/ui_lib.c b/crypto/ui/ui_lib.c
index 7b08107f7a..cc5b5f1ecb 100644
--- a/crypto/ui/ui_lib.c
+++ b/crypto/ui/ui_lib.c
@@ -92,7 +92,10 @@ UI *UI_new_method(const UI_METHOD *method)
else
ret->meth = method;
- CRYPTO_new_ex_data(CRYPTO_EX_INDEX_UI, ret, &ret->ex_data);
+ if (!CRYPTO_new_ex_data(CRYPTO_EX_INDEX_UI, ret, &ret->ex_data)) {
+ OPENSSL_free(ret);
+ return NULL;
+ }
return ret;
}