X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fhelper.c;h=c7cfaebe8df57e334f93fbb82e14a576a64ec557;hb=e4955eebfee4b79846bbb5ba27daaa39a02ef05c;hp=d453f2a66593e79548e95e7a8d5b62d478a821d5;hpb=ebb78b26936b7c3db462befcef45b4dcd2590b7e;p=pspp diff --git a/src/ui/gui/helper.c b/src/ui/gui/helper.c index d453f2a665..c7cfaebe8d 100644 --- a/src/ui/gui/helper.c +++ b/src/ui/gui/helper.c @@ -155,7 +155,14 @@ text_to_value__ (const gchar *text, } value_init (val, width); - free (data_in (ss_cstr (text), UTF8, format->type, val, width, encoding)); + char *err = data_in (ss_cstr (text), UTF8, format->type, val, width, encoding); + + if (err) + { + value_destroy (val, width); + val = NULL; + free (err); + } return val; } @@ -282,7 +289,7 @@ clone_list_store (const GtkListStore *src) -static gboolean +static gboolean on_delete (GtkWindow *window, GdkEvent *e, GtkWindow **addr) { *addr = NULL;