diff options
author | Bob Beck <beck@cvs.openbsd.org> | 2014-07-22 02:21:21 +0000 |
---|---|---|
committer | Bob Beck <beck@cvs.openbsd.org> | 2014-07-22 02:21:21 +0000 |
commit | f928d1de2411dafe69c50d139c18c7653cabc751 (patch) | |
tree | 45a8811543b166768a1cb760d5d8724640fcf1d0 /lib/libcrypto/cryptlib.c | |
parent | 93b3e769e924b98c416d6a0ee1bea74be51d0005 (diff) |
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 'lib/libcrypto/cryptlib.c')
-rw-r--r-- | lib/libcrypto/cryptlib.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libcrypto/cryptlib.c b/lib/libcrypto/cryptlib.c index 6a75d9568c0..000f76a6a23 100644 --- a/lib/libcrypto/cryptlib.c +++ b/lib/libcrypto/cryptlib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cryptlib.c,v 1.32 2014/07/11 08:44:47 jsing Exp $ */ +/* $OpenBSD: cryptlib.c,v 1.33 2014/07/22 02:21:20 beck Exp $ */ /* ==================================================================== * Copyright (c) 1998-2006 The OpenSSL Project. All rights reserved. * @@ -210,7 +210,7 @@ CRYPTO_get_new_lockid(char *name) CRYPTOerr(CRYPTO_F_CRYPTO_GET_NEW_LOCKID, ERR_R_MALLOC_FAILURE); return (0); } - if ((str = BUF_strdup(name)) == NULL) { + if (name == NULL || (str = strdup(name)) == NULL) { CRYPTOerr(CRYPTO_F_CRYPTO_GET_NEW_LOCKID, ERR_R_MALLOC_FAILURE); return (0); } |