summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/ui/ui_lib.c
diff options
context:
space:
mode:
authorbeck <>2014-07-22 02:21:20 +0000
committerbeck <>2014-07-22 02:21:20 +0000
commitc4e3191290f7dc034878e8c9eee2f395db280afd (patch)
tree98cdda658409d8b250bb1c60e392a61894be842a /src/lib/libcrypto/ui/ui_lib.c
parent2384810741e4764a84e9c140c697eb7f1ff264c0 (diff)
downloadopenbsd-c4e3191290f7dc034878e8c9eee2f395db280afd.tar.gz
openbsd-c4e3191290f7dc034878e8c9eee2f395db280afd.tar.bz2
openbsd-c4e3191290f7dc034878e8c9eee2f395db280afd.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.c6
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}