diff options
Diffstat (limited to 'crypto/ui')
-rw-r--r-- | crypto/ui/ui_lib.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/crypto/ui/ui_lib.c b/crypto/ui/ui_lib.c index a5d8aac064..3d0df5140d 100644 --- a/crypto/ui/ui_lib.c +++ b/crypto/ui/ui_lib.c @@ -536,8 +536,13 @@ UI_METHOD *UI_create_method(char *name) { UI_METHOD *ui_method = OPENSSL_zalloc(sizeof(*ui_method)); - if (ui_method != NULL) + if (ui_method != NULL) { ui_method->name = OPENSSL_strdup(name); + if (ui_method->name == NULL) { + OPENSSL_free(ui_method); + return NULL; + } + } return ui_method; } |