From ac646e96befa225637efe4744bd77dc3f1ff7d32 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 8 Oct 2023 11:54:14 +0200 Subject: [PATCH] use copystring instead of strdup when reading environments. The mismatched the underlying code which allocates via copystring. --- src/common/audio/sound/s_environment.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/audio/sound/s_environment.cpp b/src/common/audio/sound/s_environment.cpp index 7a2dbd9a50..5b4ea79f1e 100644 --- a/src/common/audio/sound/s_environment.cpp +++ b/src/common/audio/sound/s_environment.cpp @@ -538,7 +538,7 @@ void S_ReadReverbDef (FScanner &sc) while (sc.GetString ()) { - name = strdup (sc.String); + name = copystring(sc.String); sc.MustGetNumber (); id1 = sc.Number; sc.MustGetNumber ();