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/main_statusbar.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ui/gtk/main_statusbar.c') diff --git a/ui/gtk/main_statusbar.c b/ui/gtk/main_statusbar.c index b7797d9ffa..937aaf8581 100644 --- a/ui/gtk/main_statusbar.c +++ b/ui/gtk/main_statusbar.c @@ -740,14 +740,14 @@ statusbar_cf_file_closed_cb(capture_file *cf _U_) static void statusbar_cf_file_read_started_cb(capture_file *cf, const char *action) { - const gchar *name_ptr; + gchar *name_ptr; /* Ensure we pop any previous loaded filename */ statusbar_pop_file_msg(); name_ptr = g_filename_display_basename(cf->filename); - statusbar_push_file_msg(" %s: %s", action, name_ptr); + g_free(name_ptr); } -- cgit v1.2.3