From: Pierangelo Masarati Date: Tue, 10 Sep 2013 19:58:28 +0000 (+0200) Subject: ITS#7687: password modify can muck with controls (quick fix) X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=919a0f5b54dad3acf2f84e7993bb00e7aa098037;p=openldap ITS#7687: password modify can muck with controls (quick fix) --- diff --git a/servers/slapd/back-ldap/chain.c b/servers/slapd/back-ldap/chain.c index d2e3e2441a..3ecc3b673c 100644 --- a/servers/slapd/back-ldap/chain.c +++ b/servers/slapd/back-ldap/chain.c @@ -196,12 +196,13 @@ chaining_control_remove( * added by the chain overlay, so it's the only one we explicitly * free */ if ( op->o_ctrls != oldctrls ) { - assert( op->o_ctrls != NULL ); - assert( op->o_ctrls[ 0 ] != NULL ); + if ( op->o_ctrls != NULL ) { + assert( op->o_ctrls[ 0 ] != NULL ); - free( op->o_ctrls ); + free( op->o_ctrls ); - op->o_chaining = 0; + op->o_chaining = 0; + } op->o_ctrls = oldctrls; }