mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-18 17:30:10 +00:00
Don't leak display name
Bug 628656 - _gdk_windowing_get_startup_notify_id memory leak
get_display_name() returns a newly allocated string, which was being fed
directory info a g_strdup_printf() call.
(cherry picked from commit bf3b5f785e
)
This commit is contained in:
parent
d72cfae56a
commit
1175e6b98c
@ -312,7 +312,11 @@ _gdk_windowing_get_startup_notify_id (GAppLaunchContext *context,
|
||||
if (files_count == 0)
|
||||
description = g_strdup_printf (_("Starting %s"), g_app_info_get_name (info));
|
||||
else if (files_count == 1)
|
||||
description = g_strdup_printf (_("Opening %s"), get_display_name (files->data));
|
||||
{
|
||||
gchar *display_name = get_display_name (files->data);
|
||||
description = g_strdup_printf (_("Opening %s"), display_name);
|
||||
g_free (display_name);
|
||||
}
|
||||
else
|
||||
description = g_strdup_printf (g_dngettext (GETTEXT_PACKAGE,
|
||||
"Opening %d Item",
|
||||
|
Loading…
Reference in New Issue
Block a user