|
From: <svn...@op...> - 2009-11-10 11:42:23
|
Author: bellmich Date: Tue Nov 10 12:42:06 2009 New Revision: 1353 URL: http://libsyncml.opensync.org/changeset/1353 Log: const pointers must not be freed Modified: trunk/libsyncml/data_sync_api/data_sync_devinf.c trunk/libsyncml/sml_manager.c Modified: trunk/libsyncml/data_sync_api/data_sync_devinf.c ============================================================================== --- trunk/libsyncml/data_sync_api/data_sync_devinf.c Mon Nov 9 17:10:34 2009 (r1352) +++ trunk/libsyncml/data_sync_api/data_sync_devinf.c Tue Nov 10 12:42:06 2009 (r1353) @@ -747,7 +747,6 @@ self->priv->local = sml_location_new(); const gchar *ident = sml_data_sync_dev_inf_get_identifier(); sml_location_set_uri(self->priv->local, ident); - smlSafeCFree(&ident); } if (self->priv->fake_device) Modified: trunk/libsyncml/sml_manager.c ============================================================================== --- trunk/libsyncml/sml_manager.c Mon Nov 9 17:10:34 2009 (r1352) +++ trunk/libsyncml/sml_manager.c Tue Nov 10 12:42:06 2009 (r1353) @@ -352,8 +352,11 @@ goto error; smlHeaderFree(header); - if (cred) + header = NULL; + if (cred) { smlCredUnref(cred); + cred = NULL; + } /* Now let the session handle the commands etc */ if (!smlSessionReceiveBody(session, parser, &locerror)) @@ -361,6 +364,7 @@ /* Free the parser */ smlParserFree(parser); + parser = NULL; /* make the session accessible for others */ smlSessionUnlock(session); |