diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2001-06-23 11:51:16 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2001-06-23 11:51:16 +0000 |
commit | 54f7ebe789e4dbd9f601452b5bb26432b9754a7b (patch) | |
tree | 3ca5e32c32e8c556755893345bc3c5a7ccd541cc /crypto/ui/ui_lib.c | |
parent | dd499e74de0fb93015b55ed1ade06d69b695b86a (diff) |
In UI_dup_*() function, use the duped string, not the original.
Diffstat (limited to 'crypto/ui/ui_lib.c')
-rw-r--r-- | crypto/ui/ui_lib.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/crypto/ui/ui_lib.c b/crypto/ui/ui_lib.c index bc9de97c04..395f700ffd 100644 --- a/crypto/ui/ui_lib.c +++ b/crypto/ui/ui_lib.c @@ -104,6 +104,8 @@ static void free_string(UI_STRING *uis) void UI_free(UI *ui) { + if (ui == NULL) + return; sk_UI_STRING_pop_free(ui->strings,free_string); OPENSSL_free(ui); } @@ -172,7 +174,7 @@ int UI_dup_input_string(UI *ui, const char *prompt, int flags, } } - return general_allocate_string(ui, prompt, 1, + return general_allocate_string(ui, prompt_copy, 1, UIT_PROMPT, flags, result_buf, minsize, maxsize, NULL); } @@ -198,7 +200,7 @@ int UI_dup_verify_string(UI *ui, const char *prompt, int flags, } } - return general_allocate_string(ui, prompt, 1, + return general_allocate_string(ui, prompt_copy, 1, UIT_VERIFY, flags, result_buf, minsize, maxsize, test_buf); } @@ -222,7 +224,7 @@ int UI_dup_info_string(UI *ui, const char *text) } } - return general_allocate_string(ui, text, 1, UIT_INFO, 0, NULL, 0, 0, + return general_allocate_string(ui, text_copy, 1, UIT_INFO, 0, NULL, 0, 0, NULL); } |