[gnome-software] trivial: Use g_autofree
- From: Kalev Lember <klember src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] trivial: Use g_autofree
- Date: Thu, 17 Dec 2015 09:27:01 +0000 (UTC)
commit d0056dac58a09e287b16b2c6efb18cb833a19de5
Author: Kalev Lember <klember redhat com>
Date: Thu Dec 17 10:09:31 2015 +0100
trivial: Use g_autofree
src/gs-progress-button.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/src/gs-progress-button.c b/src/gs-progress-button.c
index fe58c82..3b025ab 100644
--- a/src/gs-progress-button.c
+++ b/src/gs-progress-button.c
@@ -35,7 +35,7 @@ G_DEFINE_TYPE (GsProgressButton, gs_progress_button, GTK_TYPE_BUTTON)
void
gs_progress_button_set_progress (GsProgressButton *button, guint percentage)
{
- gchar *css;
+ g_autofree gchar *css = NULL;
if (percentage == 0)
css = g_strdup (".install-progress { background-size: 0; }");
@@ -45,7 +45,6 @@ gs_progress_button_set_progress (GsProgressButton *button, guint percentage)
css = g_strdup_printf (".install-progress { background-size: %d%%; }", percentage);
gtk_css_provider_load_from_data (button->css_provider, css, -1, NULL);
- g_free (css);
}
void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]