[gnome-calendar/gnome-3-24] week-header: fix memory leak
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar/gnome-3-24] week-header: fix memory leak
- Date: Mon, 15 May 2017 20:53:37 +0000 (UTC)
commit 97620a4c00b5d46cb2e0a8821f7c0699bb05df93
Author: Mohammed Sadiq <sadiq sadiqpk org>
Date: Fri May 12 20:22:39 2017 +0530
week-header: fix memory leak
https://bugzilla.gnome.org/show_bug.cgi?id=782561
src/views/gcal-week-header.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/views/gcal-week-header.c b/src/views/gcal-week-header.c
index 460450c..d305b83 100644
--- a/src/views/gcal-week-header.c
+++ b/src/views/gcal-week-header.c
@@ -1193,7 +1193,7 @@ gcal_week_header_draw (GtkWidget *widget,
for (i = 0; i < 7; i++)
{
- gchar *weekday_date, *weekday_abv;
+ gchar *weekday_date, *weekday_abv, *weekday;
gdouble x;
gint font_width;
gint n_day;
@@ -1232,7 +1232,9 @@ gcal_week_header_draw (GtkWidget *widget,
gtk_style_context_restore (context);
/* Draws the days name */
- weekday_abv = g_strdup_printf ("%s", g_utf8_strup (gcal_get_weekday ((i + self->first_weekday) % 7),
-1));
+ weekday = g_utf8_strup (gcal_get_weekday ((i + self->first_weekday) % 7), -1);
+ weekday_abv = g_strdup_printf ("%s", weekday);
+ g_free (weekday);
gtk_style_context_save (context);
gtk_style_context_add_class (context, "week-names");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]