diff --git a/erts/emulator/beam/erl_alloc_util.c b/erts/emulator/beam/erl_alloc_util.c index ec9791e6aad0..7e1d50dd1dbf 100644 --- a/erts/emulator/beam/erl_alloc_util.c +++ b/erts/emulator/beam/erl_alloc_util.c @@ -6583,7 +6583,7 @@ realloc_thr_pref(ErtsAlcType_t type, Allctr_t *pref_allctr, void *p, Uint size, goto restart; } - if (pref_allctr->atags) { + if (pref_allctr->atags && res) { set_alloc_tag(pref_allctr, res, type); }