diff options
author | Doug Hogan <[email protected]> | 2019-01-14 23:24:28 -0800 |
---|---|---|
committer | Doug Hogan <[email protected]> | 2019-01-14 23:24:28 -0800 |
commit | 9ef96d08df6a55912dfbb8de2e460f719f5a6728 (patch) | |
tree | 8aec41f81ebf1f7e93fa4ebc49d1d5cb41e9f3cf | |
parent | 825c73a0f8fdd27a37971a7bd7090356d2900565 (diff) | |
download | otp-9ef96d08df6a55912dfbb8de2e460f719f5a6728.tar.gz otp-9ef96d08df6a55912dfbb8de2e460f719f5a6728.tar.bz2 otp-9ef96d08df6a55912dfbb8de2e460f719f5a6728.zip |
Make crypto_free() NULL safe
-rw-r--r-- | lib/crypto/c_src/crypto_callback.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/crypto/c_src/crypto_callback.c b/lib/crypto/c_src/crypto_callback.c index c0ca18e2ce..0141ccd840 100644 --- a/lib/crypto/c_src/crypto_callback.c +++ b/lib/crypto/c_src/crypto_callback.c @@ -92,6 +92,9 @@ static void* crypto_realloc(void* ptr, size_t size CCB_FILE_LINE_ARGS) static void crypto_free(void* ptr CCB_FILE_LINE_ARGS) { + if (ptr == NULL) + return; + enif_free(ptr); } |