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/rpc_stat.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/rpc_stat.c')
-rw-r--r-- | ui/gtk/rpc_stat.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ui/gtk/rpc_stat.c b/ui/gtk/rpc_stat.c index 5fc19b943d..b32ff2329e 100644 --- a/ui/gtk/rpc_stat.c +++ b/ui/gtk/rpc_stat.c @@ -70,10 +70,13 @@ typedef struct _rpcstat_t { static char * rpcstat_gen_title(rpcstat_t *rs) { + char *display_name; char *title; + display_name = cf_get_display_name(&cfile); title = g_strdup_printf("ONC-RPC Service Response Time statistics for %s version %d: %s", - rs->prog, rs->version, cf_get_display_name(&cfile)); + rs->prog, rs->version, display_name); + g_free(display_name); return title; } |