Hello community,

here is the log from the commit of package pasystray for openSUSE:Factory 
checked in at 2017-11-30 12:45:34
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/pasystray (Old)
 and      /work/SRC/openSUSE:Factory/.pasystray.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "pasystray"

Thu Nov 30 12:45:34 2017 rev:3 rq:546363 version:0.6.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/pasystray/pasystray.changes      2016-07-20 
09:24:28.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.pasystray.new/pasystray.changes 2017-11-30 
12:45:39.761327011 +0100
@@ -1,0 +2,6 @@
+Tue Nov 28 16:37:54 UTC 2017 - [email protected]
+
+- Add upstream patch fix-memory-leak.patch for memory leak (boo#1070195) 
+- spec file cleaned
+
+-------------------------------------------------------------------

New:
----
  fix-memory-leak.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ pasystray.spec ++++++
--- /var/tmp/diff_new_pack.Nh1u0O/_old  2017-11-30 12:45:40.445302146 +0100
+++ /var/tmp/diff_new_pack.Nh1u0O/_new  2017-11-30 12:45:40.449302001 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package pasystray
 #
-# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -29,6 +29,8 @@
 Group:          System/GUI/Other
 Url:            https://github.com/christophgysin/pasystray
 Source:         
https://github.com/christophgysin/pasystray/archive/pasystray-%{version}.tar.gz
+# PATCH-FIX-UPSTREAM fix-memory-leak.patch boo#1070195
+Patch0:         fix-memory-leak.patch
 BuildRequires:  automake
 BuildRequires:  pkgconfig
 BuildRequires:  update-desktop-files
@@ -51,7 +53,6 @@
 Suggests:       paprefs
 Suggests:       pavucontrol
 Suggests:       pavumeter
-BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 %if %{build_wayland_backend}
 BuildRequires:  pkgconfig(gdk-wayland-3.0)
 BuildRequires:  pkgconfig(gtk+-wayland-3.0)
@@ -64,6 +65,7 @@
 
 %prep
 %setup -q -n %{name}-%{name}-%{version}
+%patch0 -p1
 
 %build
 autoreconf -fi
@@ -71,12 +73,11 @@
 make %{?_smp_mflags}
 
 %install
-make %{?_smp_mflags} DESTDIR=%{buildroot} install
+%make_install
 %suse_update_desktop_file  -u -r 
%{buildroot}%{_datadir}/applications/pasystray.desktop AudioVideo Mixer
 %suse_update_desktop_file  -u -r 
%{buildroot}%{_sysconfdir}/xdg/autostart/pasystray.desktop AudioVideo Mixer
 
 %files
-%defattr(-,root,root)
 %doc AUTHORS LICENSE README.md TODO
 %dir %{_datadir}/pasystray
 %{_sysconfdir}/xdg/autostart/pasystray.desktop

++++++ fix-memory-leak.patch ++++++
>From 23806233251ea77cf43921220cac5b66874b481a Mon Sep 17 00:00:00 2001
From: Christoph Gysin <[email protected]>
Date: Sat, 11 Nov 2017 18:04:32 +0200
Subject: [PATCH] systray: fix memory leak

Thanks to @l12436

fixes #94
---
 src/systray.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/systray.c b/src/systray.c
index 58dbc71..dfe806d 100644
--- a/src/systray.c
+++ b/src/systray.c
@@ -144,8 +144,10 @@ void systray_remove_placeholder(menu_info_t* mi)
     if(g_hash_table_size(mi->items) == 0)
     {
         GList* children = gtk_container_get_children(GTK_CONTAINER(mi->menu));
-        if(children)
+        if(children) {
             gtk_container_remove(GTK_CONTAINER(mi->menu), 
GTK_WIDGET(children->data));
+            g_list_free(children);
+        }
     }
 }
 
@@ -192,10 +194,12 @@ void systray_remove_radio_item(menu_info_t* mi, 
GtkWidget* item)
 
     /* update group */
     GList* children = gtk_container_get_children(GTK_CONTAINER(mi->menu));
-    if(children)
+    if(children) {
         mi->group = 
gtk_radio_menu_item_get_group(GTK_RADIO_MENU_ITEM(children->data));
-    else
+        g_list_free(children);
+    } else {
         mi->group = NULL;
+    }
 }
 
 GtkWidget* systray_add_item(GtkMenuShell* menu, const char* desc, const char* 
tooltip, const char* icon)

Reply via email to