diff options
author | Matt Caswell <matt@openssl.org> | 2016-05-17 15:08:43 +0100 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2016-05-18 10:47:15 +0100 |
commit | 569d0646096e6c7e07b9b89b04204eef934c3b69 (patch) | |
tree | 8e649d1b033ec73cb6134123aa0024daf2394387 /crypto/ui | |
parent | 6ef020c988bb508842dfcd517a4b41cae214f641 (diff) | |
download | openssl-569d0646096e6c7e07b9b89b04204eef934c3b69.tar.gz |
Add some error messages for malloc fails
Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'crypto/ui')
-rw-r--r-- | crypto/ui/ui_err.c | 1 | ||||
-rw-r--r-- | crypto/ui/ui_lib.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/crypto/ui/ui_err.c b/crypto/ui/ui_err.c index e97dd06533..fbcb886180 100644 --- a/crypto/ui/ui_err.c +++ b/crypto/ui/ui_err.c @@ -21,6 +21,7 @@ static ERR_STRING_DATA UI_str_functs[] = { {ERR_FUNC(UI_F_GENERAL_ALLOCATE_BOOLEAN), "general_allocate_boolean"}, {ERR_FUNC(UI_F_GENERAL_ALLOCATE_PROMPT), "general_allocate_prompt"}, {ERR_FUNC(UI_F_GENERAL_ALLOCATE_STRING), "GENERAL_ALLOCATE_STRING"}, + {ERR_FUNC(UI_F_UI_CREATE_METHOD), "UI_create_method"}, {ERR_FUNC(UI_F_UI_CTRL), "UI_ctrl"}, {ERR_FUNC(UI_F_UI_DUP_ERROR_STRING), "UI_dup_error_string"}, {ERR_FUNC(UI_F_UI_DUP_INFO_STRING), "UI_dup_info_string"}, diff --git a/crypto/ui/ui_lib.c b/crypto/ui/ui_lib.c index 3d0df5140d..1213892ad5 100644 --- a/crypto/ui/ui_lib.c +++ b/crypto/ui/ui_lib.c @@ -540,6 +540,7 @@ UI_METHOD *UI_create_method(char *name) ui_method->name = OPENSSL_strdup(name); if (ui_method->name == NULL) { OPENSSL_free(ui_method); + UIerr(UI_F_UI_CREATE_METHOD, ERR_R_MALLOC_FAILURE); return NULL; } } |