[gnome-terminal/gnome-3-28] app: Plug a mem leak
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-terminal/gnome-3-28] app: Plug a mem leak
- Date: Mon, 9 Apr 2018 19:42:40 +0000 (UTC)
commit 84b94b0dd053f200ff982a87b6ea68e6005b3004
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 f820d2b..6a7ba47 100644
--- a/src/terminal-app.c
+++ b/src/terminal-app.c
@@ -429,7 +429,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;
@@ -499,12 +499,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]