diff options
author | Björn-Egil Dahlberg <[email protected]> | 2010-11-22 12:19:21 +0100 |
---|---|---|
committer | Björn-Egil Dahlberg <[email protected]> | 2010-11-22 12:19:26 +0100 |
commit | 29b572dbd1546796a0a94066548edfa3da6b4b9d (patch) | |
tree | 5adabfdfdf1ff12ef82ffa0322b225d4b8330225 /lib/erl_interface/src/decode/decode_big.c | |
parent | f7d51b976aceb0c3e2c48ad1be2df8b6fff6353d (diff) | |
parent | 9dae2c94560e0b8e5a69f8d2b22f4abc858c3bd7 (diff) | |
download | otp-29b572dbd1546796a0a94066548edfa3da6b4b9d.tar.gz otp-29b572dbd1546796a0a94066548edfa3da6b4b9d.tar.bz2 otp-29b572dbd1546796a0a94066548edfa3da6b4b9d.zip |
Merge branch 'ms/ei-fixes' into dev
* ms/ei-fixes:
ei: check memory was allocated
ei: error if return value of ei_alloc_big is NULL
OTP-8943
Diffstat (limited to 'lib/erl_interface/src/decode/decode_big.c')
-rw-r--r-- | lib/erl_interface/src/decode/decode_big.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/erl_interface/src/decode/decode_big.c b/lib/erl_interface/src/decode/decode_big.c index efe9c6e5d9..b5e9b45a3b 100644 --- a/lib/erl_interface/src/decode/decode_big.c +++ b/lib/erl_interface/src/decode/decode_big.c @@ -74,7 +74,7 @@ erlang_big *ei_alloc_big(unsigned int digit_bytes) { memset(b,(char)0,sizeof(erlang_big)); if ( (b->digits = malloc(2*n)) == NULL) { free(b); - return 0; + return NULL; } b->arity = digit_bytes; |