CRYPTO_realloc

Resize an OpenSSL allocation to num bytes (file/line for debugging).

Synopsis

Declared in <openssl/crypto.h>

void*
CRYPTO_realloc(
    void* addr,
    size_t num,
    char const* file,
    int line);

Return Value

Reallocated pointer, or NULL on failure (original block left allocated on failure).

Parameters

NameDescription
addrExisting allocation, or NULL to allocate anew.
numNew size in bytes (0 frees addr and returns NULL).
fileSource file name recorded with the allocation (usually FILE).
lineSource line recorded with the allocation (usually LINE).