For some reason people are sharing a lot to OpenSSL code these days and I
noticed this in on of these files. I tried to match the coding style.

diff --git a/crypto/mem.c b/crypto/mem.c
index f7984fa..b2d47d7 100644
--- a/crypto/mem.c
+++ b/crypto/mem.c
@@ -327,6 +327,8 @@ char *CRYPTO_strdup(const char *str, const char *file, int 
line)
        {
        char *ret = CRYPTO_malloc(strlen(str)+1, file, line);
 
+       if (ret == NULL) return NULL;
+
        strcpy(ret, str);
        return ret;
        }

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       openssl-dev@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to