From: Howard Chu Date: Thu, 16 Aug 2007 20:03:27 +0000 (+0000) Subject: Paranoia for prev commit X-Git-Tag: OPENLDAP_REL_ENG_2_4_MP~198 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=a16eea9d8e915edf6ffc357d70c355ec30d9c44d;p=openldap Paranoia for prev commit --- diff --git a/servers/slapd/overlays/ppolicy.c b/servers/slapd/overlays/ppolicy.c index 83da96c3ee..2900c64c31 100644 --- a/servers/slapd/overlays/ppolicy.c +++ b/servers/slapd/overlays/ppolicy.c @@ -2138,8 +2138,10 @@ ppolicy_close( /* Perhaps backover should provide bi_destroy hooks... */ ov_count--; - if ( !ov_count ) + if ( ov_count <=0 && pwcons ) { free( pwcons ); + pwcons = NULL; + } free( pi->def_policy.bv_val ); free( pi );