From 6d2335d1f71baa624fba6f50d67f9f3699138b97 Mon Sep 17 00:00:00 2001 From: Holger Vogt Date: Sat, 18 Jul 2026 17:01:39 +0200 Subject: [PATCH] Avoid freeing a non-malloced entry --- src/frontend/options.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/frontend/options.c b/src/frontend/options.c index 0eeb41b0a..3f08209d5 100644 --- a/src/frontend/options.c +++ b/src/frontend/options.c @@ -383,7 +383,8 @@ cp_usrset(struct variable *var, bool isset) return (US_DONTRECORD); } else if (eq(var->va_name, "curplotname")) { if (plot_cur && (var->va_type == CP_STRING)) { - FREE(plot_cur->pl_name); + if (!eq(plot_cur->pl_name, "constants")) /* not malloced! */ + FREE(plot_cur->pl_name); plot_cur->pl_name = copy(var->va_string); } else @@ -391,7 +392,8 @@ cp_usrset(struct variable *var, bool isset) return (US_DONTRECORD); } else if (eq(var->va_name, "curplottitle")) { if (plot_cur && (var->va_type == CP_STRING)) { - FREE(plot_cur->pl_title); + if (!eq(plot_cur->pl_title, "Constant values")) /* not malloced! */ + FREE(plot_cur->pl_title); plot_cur->pl_title = copy(var->va_string); } else