PsppireVarStore: Fix memory leak 20120711000504/pspp 20120712000504/pspp 20120713000505/pspp
authorJohn Darrington <john@darrington.wattle.id.au>
Tue, 10 Jul 2012 17:02:47 +0000 (19:02 +0200)
committerJohn Darrington <john@darrington.wattle.id.au>
Tue, 10 Jul 2012 17:02:47 +0000 (19:02 +0200)
src/ui/gui/psppire-var-store.c

index 27072c1adf1f6f18304c90b23b83a92ede039613..ef9d978dd211342b79c118025428db92bce12249 100644 (file)
@@ -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;
            }
          }
       }