From: <svn...@op...> - 2009-10-01 15:13:10
|
Author: bellmich Date: Thu Oct 1 17:12:58 2009 New Revision: 1303 URL: http://libsyncml.opensync.org/changeset/1303 Log: fixed cleanup code (mainly added unref for data_store_server) Modified: trunk/libsyncml/data_sync_api/sml_data_sync_data_store.c Modified: trunk/libsyncml/data_sync_api/sml_data_sync_data_store.c ============================================================================== --- trunk/libsyncml/data_sync_api/sml_data_sync_data_store.c Thu Oct 1 17:12:33 2009 (r1302) +++ trunk/libsyncml/data_sync_api/sml_data_sync_data_store.c Thu Oct 1 17:12:58 2009 (r1303) @@ -95,18 +95,32 @@ sml_data_sync_data_store_finalize (GObject *object) { SmlDataSyncDataStore *self = (SmlDataSyncDataStore *) object; - if (self->priv->data_sync) + + if (self->priv->data_sync) { g_object_unref(self->priv->data_sync); - if (self->priv->remote) + self->priv->data_sync = NULL; + } + + if (self->priv->data_store_server) { + g_object_unref(self->priv->data_store_server); + self->priv->data_store_server = NULL; + } + + if (self->priv->remote) { g_object_unref(self->priv->remote); - if (self->priv->local) + self->priv->remote = NULL; + } + + if (self->priv->local) { g_object_unref(self->priv->local); - if (self->priv->content_type) + self->priv->local = NULL; + } + + if (self->priv->content_type) { g_free(self->priv->content_type); - self->priv->data_sync = NULL; - self->priv->remote = NULL; - self->priv->local = NULL; - self->priv->content_type = NULL; + self->priv->content_type = NULL; + } + G_OBJECT_CLASS (sml_data_sync_data_store_parent_class)->finalize (object); } |