]> git.sur5r.net Git - openldap/commitdiff
plug more leaks
authorPierangelo Masarati <ando@openldap.org>
Sun, 7 Aug 2005 12:55:15 +0000 (12:55 +0000)
committerPierangelo Masarati <ando@openldap.org>
Sun, 7 Aug 2005 12:55:15 +0000 (12:55 +0000)
servers/slapd/back-ldap/config.c

index c80845c75e504dda06a5403c2aa371662a0ca765..7a8af5776a7f370d8e2570bdbee09cc9da9ebd05 100644 (file)
@@ -725,6 +725,7 @@ ldap_back_cf_gen( ConfigArgs *c )
                ldap_charray_free( urllist );
 #else
                li->url = c->value_string;
+               c->value_string = NULL;
 #endif
                break;
        }
@@ -757,7 +758,10 @@ ldap_back_cf_gen( ConfigArgs *c )
                if ( !BER_BVISNULL( &li->acl_authcDN ) ) {
                        free( li->acl_authcDN.bv_val );
                }
+               ber_memfree_x( c->value_dn.bv_val, NULL );
                li->acl_authcDN = c->value_ndn;
+               BER_BVZERO( &c->value_dn );
+               BER_BVZERO( &c->value_ndn );
                break;
 
        case LDAP_BACK_CFG_ACL_PASSWD:
@@ -874,7 +878,10 @@ ldap_back_cf_gen( ConfigArgs *c )
                if ( !BER_BVISNULL( &li->idassert_authcDN ) ) {
                        free( li->idassert_authcDN.bv_val );
                }
+               ber_memfree_x( c->value_dn.bv_val, NULL );
                li->idassert_authcDN = c->value_ndn;
+               BER_BVZERO( &c->value_dn );
+               BER_BVZERO( &c->value_ndn );
                break;
 
        case LDAP_BACK_CFG_IDASSERT_PASSWD: