[gnome-software] trivial: Fix a small memory leak when setting custom CSS
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] trivial: Fix a small memory leak when setting custom CSS
- Date: Wed, 18 May 2016 20:13:03 +0000 (UTC)
commit 3583380aeb9c7ae3b3276668b5f89ebf579c8b0b
Author: Richard Hughes <richard hughsie com>
Date: Wed May 18 21:00:16 2016 +0100
trivial: Fix a small memory leak when setting custom CSS
src/gs-common.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/gs-common.c b/src/gs-common.c
index f3281bf..8ea7866 100644
--- a/src/gs-common.c
+++ b/src/gs-common.c
@@ -680,11 +680,11 @@ gs_utils_widget_set_custom_css (GsApp *app, GtkWidget *widget, const gchar *meta
{
GPtrArray *key_colors;
GString *str = g_string_sized_new (1024);
- GString *css_str = g_string_new ("");
GtkStyleContext *context;
const gchar *css;
guint i;
g_autofree gchar *class_name = NULL;
+ g_autoptr(GString) css_str = NULL;
g_autoptr(GtkCssProvider) provider = NULL;
g_return_if_fail (GS_IS_APP (app));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]