[hitori/leak-fix] interface: Fix a minor leak
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [hitori/leak-fix] interface: Fix a minor leak
- Date: Mon, 15 Nov 2021 22:57:03 +0000 (UTC)
commit 4a11025541d5b7bcfd7faac26d6c869e3ebabac6
Author: Philip Withnall <pwithnall endlessos org>
Date: Mon Nov 15 22:56:51 2021 +0000
interface: Fix a minor leak
Signed-off-by: Philip Withnall <pwithnall endlessos org>
src/interface.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/src/interface.c b/src/interface.c
index 14915ee..a603bed 100644
--- a/src/interface.c
+++ b/src/interface.c
@@ -99,7 +99,7 @@ hitori_create_interface (Hitori *hitori)
GtkBuilder *builder;
GtkStyleContext *style_context;
GtkCssProvider *css_provider;
- const PangoFontDescription *font;
+ PangoFontDescription *font = NULL;
GAction *action;
builder = gtk_builder_new_from_resource ("/org/gnome/Hitori/ui/hitori.ui");
@@ -152,6 +152,8 @@ hitori_create_interface (Hitori *hitori)
hitori->normal_font_desc = pango_font_description_copy (font);
hitori->painted_font_desc = pango_font_description_copy (font);
+ pango_font_description_free (font);
+
/* Load CSS for the drawing area */
css_provider = gtk_css_provider_new ();
gtk_css_provider_load_from_resource (css_provider, "/org/gnome/Hitori/ui/hitori.css");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]