[Vortex] How to correctly close a connection?

Robert M. Münch robert.muench at robertmuench.de
Fri Oct 17 14:35:44 CEST 2008

Am 17.10.2008, 14:03 Uhr, schrieb Robert M. Münch  
<robert.muench at robertmuench.de>:

> Could it be, that the receiver vortex side now stores some keys and data,
> even an error happend? And when closing the connection tries to free  
> these?

Digging deeper into the code I found out, that in vortex_sasl.c around  
line 1607 we have this code:

if (password != NULL) {
/* RM		vortex_log (LOG_DOMAIN, VORTEX_LEVEL_DEBUG, "digest md5 handler  
defined and password returned from it"); */
	vortex_log (LOG_DOMAIN, VORTEX_LEVEL_DEBUG, "digest md5 handler defined  
and password (%s) returned from it", password);
	gsasl_property_set (sctx, GSASL_PASSWORD, password);

	/* Please read the coment done to the
	 * SASL CRAM-MD5 method. The same
	 * applies to this method. */

	/* configure current digest-md5 validation data
	 * used: authid, and password */
	vortex_sasl_set_propertie (connection, VORTEX_SASL_AUTH_ID,
		(char  *) gsasl_property_get (sctx, GSASL_AUTHID), NULL);
	vortex_sasl_set_propertie (connection, VORTEX_SASL_AUTHORIZATION_ID,
		(char  *) gsasl_property_get (sctx, GSASL_AUTHZID), NULL);

	vortex_sasl_set_propertie (connection, VORTEX_SASL_REALM,
		(char  *) gsasl_property_get (sctx, GSASL_REALM), NULL);

	/* the next instruction store the password duplicating it and
	 * providing a destroy function because the SASL engine already
	 * deallocated this value.
	 * deallocate password using axl_free (verified).
	vortex_sasl_set_propertie (connection, VORTEX_SASL_PASSWORD,
/* RM		(char  *) password, axl_free); */
		(char  *) password, NULL);

I made the changes tagged with RM. Compiling vortexlib and it works. So  
the problem has something to do with providing axl_free at this place but  
the pointer seems to be somehow going wild.

Robert M. Münch
Management and IT freelancer

More information about the Vortex mailing list