diff options
author | Matt Caswell <matt@openssl.org> | 2015-10-30 12:12:26 +0100 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2015-11-09 23:48:41 +0100 |
commit | 90945fa31a42dcf3beb90540c618e4d627c595ea (patch) | |
tree | e73870c253abf0c37ca618384e30a7937a996b55 /crypto/dso/dso_dl.c | |
parent | Standardise our style for checking malloc failures (diff) | |
download | openssl-90945fa31a42dcf3beb90540c618e4d627c595ea.tar.xz openssl-90945fa31a42dcf3beb90540c618e4d627c595ea.zip |
Continue standardising malloc style for libcrypto
Continuing from previous commit ensure our style is consistent for malloc
return checks.
Reviewed-by: Kurt Roeckx <kurt@openssl.org>
Diffstat (limited to 'crypto/dso/dso_dl.c')
-rw-r--r-- | crypto/dso/dso_dl.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crypto/dso/dso_dl.c b/crypto/dso/dso_dl.c index 2b95f92eca..5315e99be7 100644 --- a/crypto/dso/dso_dl.c +++ b/crypto/dso/dso_dl.c @@ -238,7 +238,7 @@ static char *dl_merger(DSO *dso, const char *filespec1, const char *filespec2) */ if (!filespec2 || filespec1[0] == '/') { merged = OPENSSL_malloc(strlen(filespec1) + 1); - if (!merged) { + if (merged == NULL) { DSOerr(DSO_F_DL_MERGER, ERR_R_MALLOC_FAILURE); return (NULL); } @@ -249,7 +249,7 @@ static char *dl_merger(DSO *dso, const char *filespec1, const char *filespec2) */ else if (!filespec1) { merged = OPENSSL_malloc(strlen(filespec2) + 1); - if (!merged) { + if (merged == NULL) { DSOerr(DSO_F_DL_MERGER, ERR_R_MALLOC_FAILURE); return (NULL); } @@ -273,7 +273,7 @@ static char *dl_merger(DSO *dso, const char *filespec1, const char *filespec2) len--; } merged = OPENSSL_malloc(len + 2); - if (!merged) { + if (merged == NULL) { DSOerr(DSO_F_DL_MERGER, ERR_R_MALLOC_FAILURE); return (NULL); } |