[evolution-data-server/gnome-3-0] e_book_backend_file_get_changes: Fix possible memory leak
- From: Patrick Ohly <pohly src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server/gnome-3-0] e_book_backend_file_get_changes: Fix possible memory leak
- Date: Mon, 6 Jun 2011 12:09:38 +0000 (UTC)
commit c85a6bccc2412b357901386b671651a45fde74d4
Author: Christophe Dumez <christophe dumez intel com>
Date: Mon May 30 14:16:11 2011 +0300
e_book_backend_file_get_changes: Fix possible memory leak
Currently, only the list elements were freed. This patch
makes sure the GLists are freed too.
addressbook/backends/file/e-book-backend-file.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/addressbook/backends/file/e-book-backend-file.c b/addressbook/backends/file/e-book-backend-file.c
index 8ace93e..d977a2e 100644
--- a/addressbook/backends/file/e-book-backend-file.c
+++ b/addressbook/backends/file/e-book-backend-file.c
@@ -868,6 +868,14 @@ e_book_backend_file_get_changes (EBookBackendSync *backend,
e_dbhash_write (ehash);
*changes_out = changes;
+
+ /* Free the lists */
+ g_list_free (ctx.add_ids);
+ g_list_free (ctx.mod_ids);
+ g_list_free (ctx.del_ids);
+ g_list_free (ctx.add_cards);
+ g_list_free (ctx.mod_cards);
+ g_list_free (ctx.del_cards);
}
e_dbhash_destroy (ehash);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]