[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Incorrect free()?



> Hey again,
>
>   I'm getting a rather odd crash client side due to an attempt to free
> something that I'm guessing it might be wrong to free...
>
> ---
> #if SASL_VERSION_MAJOR >= 2
>                 /* XXX the application should free interact results. */
> if ( prompts != NULL && prompts->result != NULL ) {
>                         LDAP_FREE( (void *)prompts->result );
>                         prompts->result = NULL;
>                 }
> #endif

According to the comment in the code, which reflects the documentation
of cyrus sasl, the code is correct: it is the client's responsibility
to free those values.

However I note that this should be possible only if sasl_client_start()
returned SASL_INTERACT; I suggest you try moving the prompts free block
inside the following

if( saslrc == SASL_INTERACT ) {

conditional.

P.

-- 
Pierangelo Masarati
mailto:pierangelo.masarati@sys-net.it