From: John Darrington Date: Tue, 10 Jul 2012 17:02:47 +0000 (+0200) Subject: PsppireVarStore: Fix memory leak X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fbuilds%2F20120711000504%2Fpspp;p=pspp PsppireVarStore: Fix memory leak --- diff --git a/src/ui/gui/psppire-var-store.c b/src/ui/gui/psppire-var-store.c index 27072c1adf..ef9d978dd2 100644 --- a/src/ui/gui/psppire-var-store.c +++ b/src/ui/gui/psppire-var-store.c @@ -686,10 +686,14 @@ text_for_column (PsppireVarStore *vs, g_assert (vl); { + gchar *s; gchar *const vstr = value_to_text (vl->value, pv); - return g_strdup_printf (_("{%s,`%s'}_"), vstr, + s = g_strdup_printf (_("{%s,`%s'}_"), vstr, val_lab_get_escaped_label (vl)); + free (vstr); + + return s; } } }