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/sctp_graph_dlg.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/sctp_graph_dlg.c')
-rw-r--r-- | ui/gtk/sctp_graph_dlg.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ui/gtk/sctp_graph_dlg.c b/ui/gtk/sctp_graph_dlg.c index d6cf041bbb..5481931345 100644 --- a/ui/gtk/sctp_graph_dlg.c +++ b/ui/gtk/sctp_graph_dlg.c @@ -1731,14 +1731,17 @@ init_sctp_graph_window(struct sctp_udata *u_data) static void sctp_graph_set_title(struct sctp_udata *u_data) { + char *display_name; char *title; if(!u_data->io->window) { return; } + display_name = cf_get_display_name(&cfile); title = g_strdup_printf("SCTP TSNs and Sacks over Time: %s Port1 %u Port2 %u Endpoint %u", - cf_get_display_name(&cfile), u_data->parent->assoc->port1, u_data->parent->assoc->port2, u_data->dir); + display_name, u_data->parent->assoc->port1, u_data->parent->assoc->port2, u_data->dir); + g_free(display_name); gtk_window_set_title(GTK_WINDOW(u_data->io->window), title); g_free(title); } |