From: Quanah Gibson-Mount Date: Tue, 12 Feb 2008 00:46:12 +0000 (+0000) Subject: ITS#5327 X-Git-Tag: OPENLDAP_REL_ENG_2_4_8~53 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=c0928d695e1b5994d80fac2fa26b28cdeed643b3;p=openldap ITS#5327 --- diff --git a/servers/slapd/overlays/constraint.c b/servers/slapd/overlays/constraint.c index b2c92f0f5c..8ce8a0fc6a 100644 --- a/servers/slapd/overlays/constraint.c +++ b/servers/slapd/overlays/constraint.c @@ -275,14 +275,16 @@ constraint_cf_gen( ConfigArgs *c ) return ( ARG_BAD_CONF ); } - a2 = ch_malloc( sizeof(constraint) ); + a2 = ch_calloc( sizeof(constraint), 1 ); a2->ap_next = on->on_bi.bi_private; a2->ap = ap.ap; a2->re = ap.re; a2->val = ap.val; a2->lud = ap.lud; - ber_str2bv(a2->lud->lud_dn, 0, 0, &a2->dn); - ber_str2bv(a2->lud->lud_filter, 0, 0, &a2->filter); + if ( a2->lud ) { + ber_str2bv(a2->lud->lud_dn, 0, 0, &a2->dn); + ber_str2bv(a2->lud->lud_filter, 0, 0, &a2->filter); + } a2->attrs = ap.attrs; on->on_bi.bi_private = a2; break;