[evolution-data-server] libecal: fix memory leak after failed object creation



commit cef6b9e4d1d642f86be307f4bb01a86d57722319
Author: Patrick Ohly <patrick ohly intel com>
Date:   Mon Jul 23 11:19:24 2012 +0000

    libecal: fix memory leak after failed object creation
    
    Apparently e_gdbus_cal_call_create_objects_sync() returns a muids
    array even in case of failures. Free it when returning the error.
    Found in SyncEvolution unit tests with valgrind.

 calendar/libecal/e-cal.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/calendar/libecal/e-cal.c b/calendar/libecal/e-cal.c
index ecef1ed..d1e8d57 100644
--- a/calendar/libecal/e-cal.c
+++ b/calendar/libecal/e-cal.c
@@ -3362,6 +3362,7 @@ e_cal_create_object (ECal *ecal,
 	if (!e_gdbus_cal_call_create_objects_sync (priv->gdbus_cal, strv, &muids, NULL, error)) {
 		g_free (obj);
 		g_free (gdbus_obj);
+		g_strfreev (muids);
 
 		E_CALENDAR_CHECK_STATUS (E_CALENDAR_STATUS_DBUS_EXCEPTION, error);
 	}



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