diff options
author | beck <> | 2014-07-22 02:21:20 +0000 |
---|---|---|
committer | beck <> | 2014-07-22 02:21:20 +0000 |
commit | de26b5621b74df2934238e0cedd549c31c9c6a32 (patch) | |
tree | 98cdda658409d8b250bb1c60e392a61894be842a /src/lib/libcrypto/ui/ui_lib.c | |
parent | 0ed0b42beb5b86bbeae21da1895c40f4f6d552b5 (diff) | |
download | openbsd-de26b5621b74df2934238e0cedd549c31c9c6a32.tar.gz openbsd-de26b5621b74df2934238e0cedd549c31c9c6a32.tar.bz2 openbsd-de26b5621b74df2934238e0cedd549c31c9c6a32.zip |
Kill a bunch more BUF_strdup's - these are converted to have a check for
NULL before an intrinsic strdup.
ok miod@
Diffstat (limited to 'src/lib/libcrypto/ui/ui_lib.c')
-rw-r--r-- | src/lib/libcrypto/ui/ui_lib.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/libcrypto/ui/ui_lib.c b/src/lib/libcrypto/ui/ui_lib.c index 4fabcd9909..baf86d7635 100644 --- a/src/lib/libcrypto/ui/ui_lib.c +++ b/src/lib/libcrypto/ui/ui_lib.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ui_lib.c,v 1.27 2014/07/13 16:03:10 beck Exp $ */ | 1 | /* $OpenBSD: ui_lib.c,v 1.28 2014/07/22 02:21:20 beck Exp $ */ |
2 | /* Written by Richard Levitte (richard@levitte.org) for the OpenSSL | 2 | /* Written by Richard Levitte (richard@levitte.org) for the OpenSSL |
3 | * project 2001. | 3 | * project 2001. |
4 | */ | 4 | */ |
@@ -585,8 +585,8 @@ UI_create_method(char *name) | |||
585 | { | 585 | { |
586 | UI_METHOD *ui_method = calloc(1, sizeof(UI_METHOD)); | 586 | UI_METHOD *ui_method = calloc(1, sizeof(UI_METHOD)); |
587 | 587 | ||
588 | if (ui_method) | 588 | if (ui_method && name) |
589 | ui_method->name = BUF_strdup(name); | 589 | ui_method->name = strdup(name); |
590 | 590 | ||
591 | return ui_method; | 591 | return ui_method; |
592 | } | 592 | } |