>From 3a40989a962f683195be2fe29865f9d68d148bb5 Mon Sep 17 00:00:00 2001
From: Christophe Dumez <christophe.dumez@intel.com>
Date: Mon, 16 May 2011 14:38:40 +0300
Subject: [PATCH 05/10] QContactSaveRequestWorker: Fix memory leak

Correctly unref the EContact object after it is
added.
---
 engine/qcontactsaverequestworker.cpp |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/engine/qcontactsaverequestworker.cpp b/engine/qcontactsaverequestworker.cpp
index 0bbd5d3..2012c4f 100644
--- a/engine/qcontactsaverequestworker.cpp
+++ b/engine/qcontactsaverequestworker.cpp
@@ -137,6 +137,8 @@ bool QContactSaveRequestWorker::start()
       // Add
       ok = e_book_add_contact_async(m_ebook, eContact, addContactCB, m_sharedData[i]);
     }
+    // Clean up eContact
+    g_object_unref(eContact);
     if (ok) {
       subReqStarted = true;
     } else {
-- 
1.7.4.4

