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/cryptlib.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/cryptlib.c')
-rw-r--r-- | src/lib/libcrypto/cryptlib.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/libcrypto/cryptlib.c b/src/lib/libcrypto/cryptlib.c index 6a75d9568c..000f76a6a2 100644 --- a/src/lib/libcrypto/cryptlib.c +++ b/src/lib/libcrypto/cryptlib.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: cryptlib.c,v 1.32 2014/07/11 08:44:47 jsing Exp $ */ | 1 | /* $OpenBSD: cryptlib.c,v 1.33 2014/07/22 02:21:20 beck Exp $ */ |
2 | /* ==================================================================== | 2 | /* ==================================================================== |
3 | * Copyright (c) 1998-2006 The OpenSSL Project. All rights reserved. | 3 | * Copyright (c) 1998-2006 The OpenSSL Project. All rights reserved. |
4 | * | 4 | * |
@@ -210,7 +210,7 @@ CRYPTO_get_new_lockid(char *name) | |||
210 | CRYPTOerr(CRYPTO_F_CRYPTO_GET_NEW_LOCKID, ERR_R_MALLOC_FAILURE); | 210 | CRYPTOerr(CRYPTO_F_CRYPTO_GET_NEW_LOCKID, ERR_R_MALLOC_FAILURE); |
211 | return (0); | 211 | return (0); |
212 | } | 212 | } |
213 | if ((str = BUF_strdup(name)) == NULL) { | 213 | if (name == NULL || (str = strdup(name)) == NULL) { |
214 | CRYPTOerr(CRYPTO_F_CRYPTO_GET_NEW_LOCKID, ERR_R_MALLOC_FAILURE); | 214 | CRYPTOerr(CRYPTO_F_CRYPTO_GET_NEW_LOCKID, ERR_R_MALLOC_FAILURE); |
215 | return (0); | 215 | return (0); |
216 | } | 216 | } |