From a2318e842e03264d109d2ab7d82653b2f7c28dec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20H=C3=B6gberg?= Date: Thu, 15 Aug 2024 14:13:30 +0200 Subject: [PATCH] erts: Fix segmentation fault on failed reallocation --- erts/emulator/beam/erl_alloc_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erts/emulator/beam/erl_alloc_util.c b/erts/emulator/beam/erl_alloc_util.c index 3c5daa3eea1c..eb43532de001 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); }