From: <svn...@op...> - 2009-03-22 11:13:52
|
Author: henrik Date: Sun Mar 22 12:13:43 2009 New Revision: 5298 URL: http://www.opensync.org/changeset/5298 Log: Correct handling of deleted entries Modified: plugins/mozilla-sync/trunk/src/mozilla-sync.cpp Modified: plugins/mozilla-sync/trunk/src/mozilla-sync.cpp ============================================================================== --- plugins/mozilla-sync/trunk/src/mozilla-sync.cpp Sat Mar 21 16:30:49 2009 (r5297) +++ plugins/mozilla-sync/trunk/src/mozilla-sync.cpp Sun Mar 22 12:13:43 2009 (r5298) @@ -8,7 +8,7 @@ See http://www.KaarPoSoft.dk/bluezync/ $Id$ - Copyright (C) 2007 Henrik Kaare Poulsen /KaarPoSoft + Copyright (C) 2007-2009 Henrik Kaare Poulsen /KaarPoSoft This plugin is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by @@ -506,11 +506,10 @@ OSyncList *u; OSyncList *uids = osync_hashtable_get_deleted(pOSyncMozillaDatabase->pOSyncHashTable); - for (u = uids; uids; u = u->next) { + for (u = uids; u; u = u->next) { OSyncChange *change = osync_change_new(&pError); if (!change) { LOG_EXIT_REPORT_ERROR_OSYNC(0, pOSyncContext, pError); - g_free(uids); osync_error_unref(&pError); continue; } @@ -521,8 +520,7 @@ OSyncData *odata = osync_data_new(NULL, 0, pOSyncObjFormat, &pError); if (!odata) { - LOG_EXIT_REPORT_ERROR_OSYNC(0, pOSyncContext, pError); - g_free(uids); + LOG_EXIT_REPORT_ERROR_OSYNC(0, pOSyncContext, pError); osync_change_unref(change); osync_error_unref(&pError); continue; @@ -537,9 +535,8 @@ osync_hashtable_update_change(pOSyncMozillaDatabase->pOSyncHashTable, change); osync_change_unref(change); - g_free(uids); - } + osync_list_free(uids); osync_context_report_success(pOSyncContext); LOG(10, "Done getting changes for [%s]", osync_objtype_sink_get_name(pOSyncObjTypeSink)); |