diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2010-09-03 20:18:19 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2010-09-03 20:18:19 +0800 |
commit | af40da7d0ffb40515bc785bf95dbc85f439d35b2 (patch) | |
tree | a7f0fb156053217829f36f7757ee9e2d60a28485 /e-util | |
parent | eca5223b875706bd304aba1632bd303cf242e2ed (diff) | |
download | gsoc2013-evolution-af40da7d0ffb40515bc785bf95dbc85f439d35b2.tar gsoc2013-evolution-af40da7d0ffb40515bc785bf95dbc85f439d35b2.tar.gz gsoc2013-evolution-af40da7d0ffb40515bc785bf95dbc85f439d35b2.tar.bz2 gsoc2013-evolution-af40da7d0ffb40515bc785bf95dbc85f439d35b2.tar.lz gsoc2013-evolution-af40da7d0ffb40515bc785bf95dbc85f439d35b2.tar.xz gsoc2013-evolution-af40da7d0ffb40515bc785bf95dbc85f439d35b2.tar.zst gsoc2013-evolution-af40da7d0ffb40515bc785bf95dbc85f439d35b2.zip |
Bug 628653 - e_alert_new_valist memory leak
Diffstat (limited to 'e-util')
-rw-r--r-- | 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 aebee8326a..e4e698fae7 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 * |