diff options
| author | 2014-07-22 02:21:20 +0000 | |
|---|---|---|
| committer | 2014-07-22 02:21:20 +0000 | |
| commit | 694428926dc83282ccb4d9e48dd9f22565103267 (patch) | |
| tree | d6d7e4990a729c08f79b3319616873dcc91cacc4 /lib/libcrypto/cryptlib.c | |
| parent | Handle msgbuf_write() returning EAGAIN. (diff) | |
| download | wireguard-openbsd-694428926dc83282ccb4d9e48dd9f22565103267.tar.xz wireguard-openbsd-694428926dc83282ccb4d9e48dd9f22565103267.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 '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); } |
