Package: release.debian.org
Severity: normal
Tags: bookworm
User: release.debian....@packages.debian.org
Usertags: pu
X-Debbugs-Cc: mate-notification-dae...@packages.debian.org
Control: affects -1 + src:mate-notification-daemon

This changeset fixes two memories in MATE's notification daemon.

[ Reason ]
Improve robustness of MATE desktop in Debian 12.

[ Impact ]
If not accepted, memory leaks continue to exist in core component of the
MATE desktop.

[ Tests ]
Local smoke tests. No regressions, so far. Patches have been cherry-picked
from upstream.

[ Risks ]
Regression may occur to users of the MATE desktop environment.

[ Checklist ]
  [x] *all* changes are documented in the d/changelog
  [x] I reviewed all changes and I approve them
  [x] attach debdiff against the package in (old)stable
  [x] the issue is verified as fixed in unstable

[ Changes ]

+  * debian/patches:
+    + Add 1001_daemon-fix-memory-leak.patch and 
1002_mnd-daemon-fix-memory-leak.
+      patch. Fix two memory leaks in src/daemon/daemon.c and src/daemon/
+      mnd-daemon.c. (Closes: #1052565).

[ Other info ]
None.
diff -Nru mate-notification-daemon-1.26.0/debian/changelog 
mate-notification-daemon-1.26.0/debian/changelog
--- mate-notification-daemon-1.26.0/debian/changelog    2021-12-11 
21:40:50.000000000 +0100
+++ mate-notification-daemon-1.26.0/debian/changelog    2023-09-24 
23:40:09.000000000 +0200
@@ -1,3 +1,12 @@
+mate-notification-daemon (1.26.0-1+deb12u1) bookworm; urgency=medium
+
+  * debian/patches:
+    + Add 1001_daemon-fix-memory-leak.patch and 
1002_mnd-daemon-fix-memory-leak.
+      patch. Fix two memory leaks in src/daemon/daemon.c and src/daemon/
+      mnd-daemon.c. (Closes: #1052565).
+
+ -- Mike Gabriel <sunwea...@debian.org>  Sun, 24 Sep 2023 23:40:09 +0200
+
 mate-notification-daemon (1.26.0-1) unstable; urgency=medium
 
   [ Martin Wimpress ]
diff -Nru 
mate-notification-daemon-1.26.0/debian/patches/1001_daemon-fix-memory-leak.patch
 
mate-notification-daemon-1.26.0/debian/patches/1001_daemon-fix-memory-leak.patch
--- 
mate-notification-daemon-1.26.0/debian/patches/1001_daemon-fix-memory-leak.patch
    1970-01-01 01:00:00.000000000 +0100
+++ 
mate-notification-daemon-1.26.0/debian/patches/1001_daemon-fix-memory-leak.patch
    2023-09-24 23:37:04.000000000 +0200
@@ -0,0 +1,26 @@
+From 954106793cfba1cc5bb3a740dd14373ff30ee14f Mon Sep 17 00:00:00 2001
+From: rbuj <robert....@gmail.com>
+Date: Sat, 23 Oct 2021 02:59:59 +0200
+Subject: [PATCH] daemon: fix memory leak
+
+---
+ src/daemon/daemon.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+--- a/src/daemon/daemon.c
++++ b/src/daemon/daemon.c
+@@ -1685,10 +1685,10 @@
+ {
+       notify_daemon_notifications_complete_get_server_information(object,
+                       invocation,
+-                      g_strdup("Notification Daemon"),
+-                      g_strdup("MATE"),
+-                      g_strdup(PACKAGE_VERSION),
+-                      g_strdup("1.1"));
++                      "Notification Daemon",
++                      "MATE",
++                      PACKAGE_VERSION,
++                      "1.1");
+       return TRUE;
+ }
+ 
diff -Nru 
mate-notification-daemon-1.26.0/debian/patches/1002_mnd-daemon-fix-memory-leak.patch
 
mate-notification-daemon-1.26.0/debian/patches/1002_mnd-daemon-fix-memory-leak.patch
--- 
mate-notification-daemon-1.26.0/debian/patches/1002_mnd-daemon-fix-memory-leak.patch
        1970-01-01 01:00:00.000000000 +0100
+++ 
mate-notification-daemon-1.26.0/debian/patches/1002_mnd-daemon-fix-memory-leak.patch
        2023-09-24 23:38:22.000000000 +0200
@@ -0,0 +1,27 @@
+From 516275e2716ed5cbf8c1c52849fe04d934814791 Mon Sep 17 00:00:00 2001
+From: rbuj <robert....@gmail.com>
+Date: Thu, 21 Oct 2021 15:57:00 +0200
+Subject: [PATCH] mnd-daemon: fix memory leak
+
+---
+ src/daemon/mnd-daemon.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+--- a/src/daemon/mnd-daemon.c
++++ b/src/daemon/mnd-daemon.c
+@@ -63,12 +63,15 @@
+       error = NULL;
+       if (g_option_context_parse (context, argc, argv, &error) == FALSE)
+       {
++              g_option_context_free (context);
+               g_warning ("Failed to parse command line arguments: %s", 
error->message);
+               g_error_free (error);
+ 
+               return FALSE;
+       }
+ 
++      g_option_context_free (context);
++
+       if (debug)
+               g_setenv ("G_MESSAGES_DEBUG", "all", FALSE);
+ 
diff -Nru mate-notification-daemon-1.26.0/debian/patches/series 
mate-notification-daemon-1.26.0/debian/patches/series
--- mate-notification-daemon-1.26.0/debian/patches/series       2021-12-11 
21:39:46.000000000 +0100
+++ mate-notification-daemon-1.26.0/debian/patches/series       2023-09-24 
23:35:13.000000000 +0200
@@ -1 +1,3 @@
 1000_add-AssumedAppArmorLabel.patch
+1001_daemon-fix-memory-leak.patch
+1002_mnd-daemon-fix-memory-leak.patch

Reply via email to