diff options
author | Sverker Eriksson <[email protected]> | 2018-10-17 20:43:57 +0200 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2018-10-17 20:43:57 +0200 |
commit | 04dde143c505da42ca620189cfa1d3400610ebe1 (patch) | |
tree | 9cd02a9c85da73faf06f72c06f7605d8b1b3d4e2 /erts | |
parent | dc546b683572d1e28c3fb536beab71f2a67b9425 (diff) | |
parent | 1801a42d032bf43b1e7bdb54e03ec4617a80fb0d (diff) | |
download | otp-04dde143c505da42ca620189cfa1d3400610ebe1.tar.gz otp-04dde143c505da42ca620189cfa1d3400610ebe1.tar.bz2 otp-04dde143c505da42ca620189cfa1d3400610ebe1.zip |
Merge branch 'sverker/erts/debug_free_null' into maint
* sverker/erts/debug_free_null:
erts: Fix bug in debug_free for NULL pointer
Diffstat (limited to 'erts')
-rw-r--r-- | erts/emulator/beam/erl_alloc.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/erts/emulator/beam/erl_alloc.c b/erts/emulator/beam/erl_alloc.c index 8fe1ccb758..9e36d5e0d1 100644 --- a/erts/emulator/beam/erl_alloc.c +++ b/erts/emulator/beam/erl_alloc.c @@ -4030,6 +4030,9 @@ debug_free(ErtsAlcType_t n, void *extra, void *ptr) ASSERT(ERTS_ALC_N_MIN <= n && n <= ERTS_ALC_N_MAX); + if (!ptr) + return; + dptr = check_memory_fence(ptr, &size, n, ERTS_ALC_O_FREE); #ifdef ERTS_ALC_A_EXEC |