[evolution] Bug 628653 - e_alert_new_valist memory leak
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] Bug 628653 - e_alert_new_valist memory leak
- Date: Fri, 3 Sep 2010 12:18:43 +0000 (UTC)
commit af40da7d0ffb40515bc785bf95dbc85f439d35b2
Author: Matthew Barnes <mbarnes redhat com>
Date: Fri Sep 3 08:18:19 2010 -0400
Bug 628653 - e_alert_new_valist memory leak
e-util/e-alert.c | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/e-util/e-alert.c b/e-util/e-alert.c
index aebee83..e4e698f 100644
--- a/e-util/e-alert.c
+++ b/e-util/e-alert.c
@@ -529,8 +529,11 @@ e_alert_new (const gchar *tag, ...)
EAlert *
e_alert_new_valist (const gchar *tag, va_list ap)
{
+ EAlert *alert;
+ GPtrArray *args;
gchar *tmp;
- GPtrArray *args = g_ptr_array_new_with_free_func (g_free);
+
+ args = g_ptr_array_new_with_free_func (g_free);
tmp = va_arg (ap, gchar *);
while (tmp) {
@@ -538,7 +541,11 @@ e_alert_new_valist (const gchar *tag, va_list ap)
tmp = va_arg (ap, gchar *);
}
- return e_alert_new_array (tag, args);
+ alert = e_alert_new_array (tag, args);
+
+ g_ptr_array_unref (args);
+
+ return alert;
}
EAlert *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]