aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2018-10-17 20:43:57 +0200
committerSverker Eriksson <[email protected]>2018-10-17 20:43:57 +0200
commit04dde143c505da42ca620189cfa1d3400610ebe1 (patch)
tree9cd02a9c85da73faf06f72c06f7605d8b1b3d4e2 /erts/emulator
parentdc546b683572d1e28c3fb536beab71f2a67b9425 (diff)
parent1801a42d032bf43b1e7bdb54e03ec4617a80fb0d (diff)
downloadotp-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/emulator')
-rw-r--r--erts/emulator/beam/erl_alloc.c3
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