]> git.sur5r.net Git - openldap/commitdiff
Paranoia for prev commit
authorHoward Chu <hyc@openldap.org>
Thu, 16 Aug 2007 20:03:27 +0000 (20:03 +0000)
committerHoward Chu <hyc@openldap.org>
Thu, 16 Aug 2007 20:03:27 +0000 (20:03 +0000)
servers/slapd/overlays/ppolicy.c

index 83da96c3ee62e192afdb1c1602a2ec5b748c37ea..2900c64c31cd0ff17301e976080d1ca26c4df9b8 100644 (file)
@@ -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 );