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

Re: (ITS#4052) memory leak in unbind.c



Thanks for the report(s). This bug was fixed in HEAD August 1 (and so in 
2.3); apparently the fix was not backported to the 2.2 tree. I suppose 
this can serve as a request to backport the patch (which also must free 
the client controls, your patch only frees the server controls).

mike.patnode@centrify.com wrote:
> Full_Name: Mike Patnode
> Version: 2.2.26
> OS: RedHat
> URL: ftp://ftp.openldap.org/incoming/
> Submission from: (NULL) (63.199.144.29)
>
>
> The ldap controls structure should be freed as well...
>
>
> --- openldap-2.2.26/libraries/libldap/unbind.c.orig	Thu Sep 29 16:14:49 2005
> +++ openldap-2.2.26/libraries/libldap/unbind.c	Thu Sep 29 16:07:06 2005
> @@ -154,6 +154,11 @@
>  		ld->ld_options.ldo_tm_net = NULL;
>  	}
>  
> +    if ( ld->ld_options.ldo_sctrls != NULL ) {
> +        ldap_controls_free(ld->ld_options.ldo_sctrls);
> +        ld->ld_options.ldo_sctrls = NULL;
> +    }
> +
>  #ifdef HAVE_CYRUS_SASL
>  	if ( ld->ld_options.ldo_def_sasl_mech != NULL ) {
>  		LDAP_FREE( ld->ld_options.ldo_def_sasl_mech );
>
>
>   


-- 
  -- Howard Chu
  Chief Architect, Symas Corp.  http://www.symas.com
  Director, Highland Sun        http://highlandsun.com/hyc
  OpenLDAP Core Team            http://www.openldap.org/project/