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_assoc_analyse.c | |
parent | d1c1455882aa50f5ffdb5ba5dfdd6c4a4a45f649 (diff) | |
download | wireshark-dbfb305368f0178348fd613665a5f5bf05f62d8a.tar.gz |
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_assoc_analyse.c')
-rw-r--r-- | ui/gtk/sctp_assoc_analyse.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ui/gtk/sctp_assoc_analyse.c b/ui/gtk/sctp_assoc_analyse.c index 187ed9ea64..b74d283546 100644 --- a/ui/gtk/sctp_assoc_analyse.c +++ b/ui/gtk/sctp_assoc_analyse.c @@ -449,12 +449,15 @@ sctp_set_filter (GtkButton *button _U_, struct sctp_analyse* u_data) static void analyse_window_set_title(struct sctp_analyse *u_data) { + char *display_name; char *title; if(!u_data->window){ return; } - title = g_strdup_printf("SCTP Analyse Association: %s Port1 %u Port2 %u", cf_get_display_name(&cfile), u_data->assoc->port1, u_data->assoc->port2); + display_name = cf_get_display_name(&cfile); + title = g_strdup_printf("SCTP Analyse Association: %s Port1 %u Port2 %u", display_name, u_data->assoc->port1, u_data->assoc->port2); + g_free(display_name); gtk_window_set_title(GTK_WINDOW(u_data->window), title); g_free(title); } |