[gnome-shell] [St] Don't leak the font family name
- From: Colin Walters <walters src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-shell] [St] Don't leak the font family name
- Date: Mon, 4 Jan 2010 18:50:55 +0000 (UTC)
commit 767fe0ebc246704168244cd23848f987fd7fb88e
Author: Carlos MartÃn Nieto <carlos cmartin tk>
Date: Mon Jan 4 13:48:27 2010 -0500
[St] Don't leak the font family name
A copy of the string is made by pango_font_description_set_family()
and we don't need the string anymore, so we should free it
https://bugzilla.gnome.org/show_bug.cgi?id=605035
src/st/st-theme-node.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/st/st-theme-node.c b/src/st/st-theme-node.c
index 29acbd8..fb14c68 100644
--- a/src/st/st-theme-node.c
+++ b/src/st/st-theme-node.c
@@ -1953,7 +1953,10 @@ st_theme_node_get_font (StThemeNode *node)
}
if (family)
- pango_font_description_set_family (node->font_desc, family);
+ {
+ pango_font_description_set_family (node->font_desc, family);
+ g_free (family);
+ }
if (size_set)
pango_font_description_set_absolute_size (node->font_desc, size);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]