[gnome-terminal] app: Plug a mem leak
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-terminal] app: Plug a mem leak
- Date: Mon, 9 Apr 2018 19:40:11 +0000 (UTC)
commit ccd96d9e954f1d7105ee98cb64848c46e0abb7b3
Author: Christian Persch <chpe src gnome org>
Date: Mon Apr 9 21:39:29 2018 +0200
app: Plug a mem leak
src/terminal-app.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/src/terminal-app.c b/src/terminal-app.c
index 4876695..625578b 100644
--- a/src/terminal-app.c
+++ b/src/terminal-app.c
@@ -372,7 +372,7 @@ menu_append_numbered (GMenu *menu,
const char *label,
int num,
const char *action_name,
- GVariant *target)
+ GVariant *target /* floating, consumed */)
{
gs_free_gstring GString *str;
gs_unref_object GMenuItem *item;
@@ -442,12 +442,11 @@ static GMenu *
set_profile_submenu_new (ProfileData *data,
guint n_profiles)
{
- GMenu *menu = g_menu_new ();
-
/* No submenu if there's only one profile */
if (n_profiles <= 1)
return NULL;
+ GMenu *menu = g_menu_new ();
for (guint i = 0; i < n_profiles; i++) {
menu_append_numbered (menu, data[i].label, i + 1,
"win.profile",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]