diff options
author | Guy Harris <guy@alum.mit.edu> | 2012-06-03 22:03:05 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2012-06-03 22:03:05 +0000 |
commit | dbfb305368f0178348fd613665a5f5bf05f62d8a (patch) | |
tree | b9609c547a4181a21a0de0b99e1e22a577782b69 /ui/gtk/graph_analysis.c | |
parent | d1c1455882aa50f5ffdb5ba5dfdd6c4a4a45f649 (diff) |
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
Diffstat (limited to 'ui/gtk/graph_analysis.c')
-rw-r--r-- | ui/gtk/graph_analysis.c | 3 |
1 files changed, 2 insertions, 1 deletions
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); |