File 4972-erts-Fix-segmentation-fault-on-failed-reallocation.patch of Package erlang

From a2318e842e03264d109d2ab7d82653b2f7c28dec Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?John=20H=C3=B6gberg?= <john@erlang.org>
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 3c5daa3eea..eb43532de0 100644
--- a/erts/emulator/beam/erl_alloc_util.c
+++ b/erts/emulator/beam/erl_alloc_util.c
@@ -6583,7 +6583,7 @@ restart:
 	    goto restart;
 	}
 
-        if (pref_allctr->atags) {
+        if (pref_allctr->atags && res) {
             set_alloc_tag(pref_allctr, res, type);
         }
 
-- 
2.43.0

openSUSE Build Service is sponsored by