[libgdata] core: Fix a memory leak in GDataBatchOperation



commit 940ef4279001cf2ea5551192e668865d1cc52375
Author: Philip Withnall <philip tecnocode co uk>
Date:   Thu Dec 9 18:58:33 2010 +0000

    core: Fix a memory leak in GDataBatchOperation

 gdata/gdata-batch-feed.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/gdata/gdata-batch-feed.c b/gdata/gdata-batch-feed.c
index c59043b..46df2cb 100644
--- a/gdata/gdata-batch-feed.c
+++ b/gdata/gdata-batch-feed.c
@@ -145,8 +145,10 @@ parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *node, gpointer user_da
 		if (op->type != GDATA_BATCH_OPERATION_DELETION && entry == NULL)
 			goto error;
 
-		if (entry != NULL)
+		if (entry != NULL) {
 			_gdata_batch_operation_run_callback (operation, op, entry, NULL);
+			g_object_unref (entry);
+		}
 
 		g_free (status_reason);
 		xmlBufferFree (status_response);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]