From: Quanah Gibson-Mount Date: Fri, 26 Oct 2018 01:58:35 +0000 (+0000) Subject: ITS#8866 (cont) slapo-unique X-Git-Tag: OPENLDAP_REL_ENG_2_5_0ALPHA~67^2~190 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cd82de56c8ec8cbeb0b019ac934bcb84ffab2760;p=thirdparty%2Fopenldap.git ITS#8866 (cont) slapo-unique use correct memory allocation/free functions --- diff --git a/servers/slapd/overlays/unique.c b/servers/slapd/overlays/unique.c index 41c698f475..8cc652daa8 100644 --- a/servers/slapd/overlays/unique.c +++ b/servers/slapd/overlays/unique.c @@ -1012,11 +1012,11 @@ unique_search( if(uq.count) { errmsgsize = sizeof("non-unique attributes found with ") + key->bv_len; - errmsg = ch_malloc(errmsgsize); + errmsg = op->o_tmpalloc(errmsgsize, op->o_tmpmemctx); snprintf( errmsg, errmsgsize, "non-unique attributes found with %s", key->bv_val ); op->o_bd->bd_info = (BackendInfo *) on->on_info; send_ldap_error(op, rs, LDAP_CONSTRAINT_VIOLATION, errmsg); - ch_free(errmsg); + op->o_tmpfree(errmsg, op->o_tmpmemctx); return(rs->sr_err); }