[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1038433: marked as done (bookworm-pu: package libmatekbd/1.26.0-1+deb12u1)



Your message dated Sat, 22 Jul 2023 13:19:41 +0000
with message-id <E1qNCWL-005roo-DE@coccia.debian.org>
and subject line Released with 12.1
has caused the Debian Bug report #1038433,
regarding bookworm-pu: package libmatekbd/1.26.0-1+deb12u1
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
1038433: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1038433
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: release.debian.org
Severity: normal
Tags: bookworm
User: release.debian.org@packages.debian.org
Usertags: pu
X-Debbugs-Cc: libmatekbd@packages.debian.org
Control: affects -1 + src:libmatekbd

[ Reason ]
Fix of two memleaks in the drawing code of libmatekbd's keyboard layouts.

[ Impact ]
MATE users when opening the keyboard layout UI.

[ Tests ]
Patch review + manual smoke test (MATE keyboard layout displays fine still).

[ Risks ]
Minimal.

[ 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 0001_matekbd-keyboard-drawing-fix-memory-leak.patch and
+      0002_matekbd-keyboard-drawing-fix-memory-leak.patch. Fix two memory
+      leaks. Cherry-picked from recent upstream release v1.26.1.
+      (Closes: #1038430).

[ Other info ]
None.
diff -Nru libmatekbd-1.26.0/debian/changelog libmatekbd-1.26.0/debian/changelog
--- libmatekbd-1.26.0/debian/changelog	2021-12-10 22:11:08.000000000 +0100
+++ libmatekbd-1.26.0/debian/changelog	2023-06-18 09:09:08.000000000 +0200
@@ -1,3 +1,13 @@
+libmatekbd (1.26.0-1+deb12u1) bookworm; urgency=medium
+
+  * debian/patches:
+    + Add 0001_matekbd-keyboard-drawing-fix-memory-leak.patch and
+      0002_matekbd-keyboard-drawing-fix-memory-leak.patch. Fix two memory
+      leaks. Cherry-picked from recent upstream release v1.26.1.
+      (Closes: #1038430).
+
+ -- Mike Gabriel <sunweaver@debian.org>  Sun, 18 Jun 2023 09:09:08 +0200
+
 libmatekbd (1.26.0-1) unstable; urgency=medium
 
   [ Martin Wimpress ]
diff -Nru libmatekbd-1.26.0/debian/patches/0001_matekbd-keyboard-drawing-fix-memory-leak.patch libmatekbd-1.26.0/debian/patches/0001_matekbd-keyboard-drawing-fix-memory-leak.patch
--- libmatekbd-1.26.0/debian/patches/0001_matekbd-keyboard-drawing-fix-memory-leak.patch	1970-01-01 01:00:00.000000000 +0100
+++ libmatekbd-1.26.0/debian/patches/0001_matekbd-keyboard-drawing-fix-memory-leak.patch	2023-06-18 08:36:13.000000000 +0200
@@ -0,0 +1,74 @@
+From ff9924aacd16a70816ec8acdff9b0a87a5cfd343 Mon Sep 17 00:00:00 2001
+From: rbuj <robert.buj@gmail.com>
+Date: Fri, 28 Jan 2022 11:26:20 +0100
+Subject: [PATCH 1/3] matekbd-keyboard-drawing: fix memory leak
+
+Signed-off-by: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
+---
+ libmatekbd/matekbd-keyboard-drawing.c | 17 ++++++++++-------
+ 1 file changed, 10 insertions(+), 7 deletions(-)
+
+diff --git a/libmatekbd/matekbd-keyboard-drawing.c b/libmatekbd/matekbd-keyboard-drawing.c
+index 086b2e3..e2e4842 100644
+--- a/libmatekbd/matekbd-keyboard-drawing.c
++++ b/libmatekbd/matekbd-keyboard-drawing.c
+@@ -1630,16 +1630,15 @@ alloc_render_context (MatekbdKeyboardDrawing * drawing)
+ 
+ 	GtkStyleContext *style_context =
+ 	    gtk_widget_get_style_context (GTK_WIDGET (drawing));
+-	PangoFontDescription *fd = NULL;
+ 
+ 	gtk_style_context_get (style_context,
+ 	                       gtk_style_context_get_state (style_context),
+-	                       GTK_STYLE_PROPERTY_FONT, &fd, NULL);
++	                       GTK_STYLE_PROPERTY_FONT, &context->font_desc,
++	                       NULL);
+ 
+ 	context->layout = pango_layout_new (pangoContext);
+ 	pango_layout_set_ellipsize (context->layout, PANGO_ELLIPSIZE_END);
+ 
+-	context->font_desc = pango_font_description_copy (fd);
+ 	context->angle = 0;
+ 	context->scale_numerator = 1;
+ 	context->scale_denominator = 1;
+@@ -2446,7 +2445,7 @@ matekbd_keyboard_drawing_render (MatekbdKeyboardDrawing * kbdrawing,
+ 	GtkStyleContext *style_context =
+ 	    gtk_widget_get_style_context (GTK_WIDGET (kbdrawing));
+ 	GdkRGBA dark_color;
+-	PangoFontDescription *fd = NULL;
++	PangoFontDescription *fd;
+ 
+ 	gtk_style_context_get_background_color (style_context,
+ 	                                        gtk_style_context_get_state (style_context),
+@@ -2458,21 +2457,25 @@ matekbd_keyboard_drawing_render (MatekbdKeyboardDrawing * kbdrawing,
+ 
+ 	gtk_style_context_get (style_context,
+ 	                       gtk_style_context_get_state (style_context),
+-	                       GTK_STYLE_PROPERTY_FONT, &fd, NULL);
+-	fd = pango_font_description_copy (fd);
++	                       GTK_STYLE_PROPERTY_FONT, &fd,
++	                       NULL);
+ 
+ 	MatekbdKeyboardDrawingRenderContext context = {
+ 		cr,
+ 		kbdrawing->renderContext->angle,
+ 		layout,
+-		pango_font_description_copy (fd),
++		fd,
+ 		1, 1,
+ 		dark_color
+ 	};
+ 
+ 	if (!context_setup_scaling (&context, kbdrawing, width, height,
+ 	                            dpi_x, dpi_y))
++	{
++		pango_font_description_free (fd);
+ 		return FALSE;
++	}
++
+ 	cairo_translate (cr, x, y);
+ 
+ 	draw_keyboard_to_context (&context, kbdrawing);
+-- 
+2.39.2
+
diff -Nru libmatekbd-1.26.0/debian/patches/0002_matekbd-keyboard-drawing-fix-memory-leak.patch libmatekbd-1.26.0/debian/patches/0002_matekbd-keyboard-drawing-fix-memory-leak.patch
--- libmatekbd-1.26.0/debian/patches/0002_matekbd-keyboard-drawing-fix-memory-leak.patch	1970-01-01 01:00:00.000000000 +0100
+++ libmatekbd-1.26.0/debian/patches/0002_matekbd-keyboard-drawing-fix-memory-leak.patch	2023-06-18 08:36:13.000000000 +0200
@@ -0,0 +1,34 @@
+From 911b118a7ddf831800e72f8b4f64b2766e99c6fc Mon Sep 17 00:00:00 2001
+From: rbuj <robert.buj@gmail.com>
+Date: Mon, 8 Nov 2021 14:32:54 +0100
+Subject: [PATCH 2/3] matekbd-keyboard-drawing: fix memory leak
+
+Signed-off-by: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
+---
+ libmatekbd/matekbd-keyboard-drawing.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/libmatekbd/matekbd-keyboard-drawing.c b/libmatekbd/matekbd-keyboard-drawing.c
+index e2e4842..a9aec4d 100644
+--- a/libmatekbd/matekbd-keyboard-drawing.c
++++ b/libmatekbd/matekbd-keyboard-drawing.c
+@@ -2096,6 +2096,7 @@ free_cdik (			/*colors doodads indicators keys */
+ 	g_list_free (drawing->keyboard_items);
+ 	drawing->keyboard_items = NULL;
+ 
++	g_free (drawing->physical_indicators);
+ 	g_free (drawing->keys);
+ 	g_free (drawing->colors);
+ }
+@@ -2238,6 +2239,8 @@ destroy (MatekbdKeyboardDrawing * drawing)
+ 	if (drawing->surface != NULL) {
+ 		cairo_surface_destroy (drawing->surface);
+ 	}
++
++	free_cdik (drawing);
+ }
+ 
+ static void
+-- 
+2.39.2
+
diff -Nru libmatekbd-1.26.0/debian/patches/series libmatekbd-1.26.0/debian/patches/series
--- libmatekbd-1.26.0/debian/patches/series	1970-01-01 01:00:00.000000000 +0100
+++ libmatekbd-1.26.0/debian/patches/series	2023-06-18 08:36:43.000000000 +0200
@@ -0,0 +1,2 @@
+0001_matekbd-keyboard-drawing-fix-memory-leak.patch
+0002_matekbd-keyboard-drawing-fix-memory-leak.patch

--- End Message ---
--- Begin Message ---
Version: 12.1

The upload requested in this bug has been released as part of 12.1.

--- End Message ---

Reply to: