diff options
author | Lukas Larsson <[email protected]> | 2014-08-04 11:32:52 +0200 |
---|---|---|
committer | Lukas Larsson <[email protected]> | 2014-08-06 11:44:47 +0200 |
commit | ad57501215fc02a39abf3fbce978dbc43d010859 (patch) | |
tree | 230d290a4bf8489962329be1c6d7e8b8008a560c /erts/emulator/beam/utils.c | |
parent | 62081266545df8f5eda8e2043f33055cfe575126 (diff) | |
download | otp-ad57501215fc02a39abf3fbce978dbc43d010859.tar.gz otp-ad57501215fc02a39abf3fbce978dbc43d010859.tar.bz2 otp-ad57501215fc02a39abf3fbce978dbc43d010859.zip |
erts: Print error reason when malloc fails
Diffstat (limited to 'erts/emulator/beam/utils.c')
-rw-r--r-- | erts/emulator/beam/utils.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/erts/emulator/beam/utils.c b/erts/emulator/beam/utils.c index 72092ec7b0..55f9e68e78 100644 --- a/erts/emulator/beam/utils.c +++ b/erts/emulator/beam/utils.c @@ -3948,6 +3948,9 @@ erts_save_emu_args(int argc, char **argv) size += sz+1; } ptr = (char *) malloc(size); + if (!ptr) { + ERTS_INTERNAL_ERROR("malloc failed to allocate memory!"); + } #ifdef DEBUG end_ptr = ptr + size; #endif |