CRYPTO_malloc(), CRYPTO_realloc() and variants of them should return NULL