From dbfb305368f0178348fd613665a5f5bf05f62d8a Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Sun, 3 Jun 2012 22:03:05 +0000 Subject: g_filename_display_basename() returns a g_mallocated string, so its callers either need to free it or their callers need to free it or.... This means that cf_get_display_name() must always return a g_mallocated string and its callers or... must free it. For some of those callers, create a new set_window_title() routine to do the work - they're all using the same pattern. svn path=/trunk/; revision=43047 --- ui/gtk/graph_analysis.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ui/gtk/graph_analysis.c') diff --git a/ui/gtk/graph_analysis.c b/ui/gtk/graph_analysis.c index 3a4bf9bd7f..0b58c0edde 100644 --- a/ui/gtk/graph_analysis.c +++ b/ui/gtk/graph_analysis.c @@ -1927,11 +1927,12 @@ static void dialog_graph_create_window(graph_analysis_data_t *user_data) GtkWidget *hbuttonbox; GtkWidget *bt_close; GtkWidget *bt_save; - const gchar *title_name_ptr; + gchar *title_name_ptr; gchar *win_name; title_name_ptr = cf_get_display_name(&cfile); win_name = g_strdup_printf("%s - Graph Analysis", title_name_ptr); + g_free(title_name_ptr); /* create the main window */ user_data->dlg.window=dlg_window_new((user_data->dlg.title)?user_data->dlg.title:win_name); -- cgit v1.2.1