X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=crypto%2Fcryptlib.c;h=3614e3fc5d14da87333c3aec4af354dd3a8ecb95;hp=9a7e80b7f8b66ec560b0c3da9d7d97ea745a6cb6;hb=68a8a41bef90c937e5c812df65365789e86ba17c;hpb=78414a6a897db42c9bcf06aa21c705811ab33921 diff --git a/crypto/cryptlib.c b/crypto/cryptlib.c index 9a7e80b7f8..3614e3fc5d 100644 --- a/crypto/cryptlib.c +++ b/crypto/cryptlib.c @@ -120,10 +120,11 @@ char *name; SSLeay_MSVC5_hack=(double)name[0]*(double)name[1]; #endif - if (app_locks == NULL) - if ((app_locks=sk_new_null()) == NULL) - CRYPTOerr(CRYPTO_F_CRYPTO_GET_NEW_LOCKID,ERR_R_MALLOC_FAILURE); - return(0); + if ((app_locks == NULL) && ((app_locks=sk_new_null()) == NULL)) + { + CRYPTOerr(CRYPTO_F_CRYPTO_GET_NEW_LOCKID,ERR_R_MALLOC_FAILURE); + return(0); + } if ((str=BUF_strdup(name)) == NULL) return(0); i=sk_push(app_locks,str);