From: Pierangelo Masarati Date: Mon, 13 Aug 2007 16:29:04 +0000 (+0000) Subject: plug leak X-Git-Tag: OPENLDAP_REL_ENG_2_4_MP~225 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=4a249bbe0ddf616a7ca3798972c4dbda416f329f;p=openldap plug leak --- diff --git a/servers/slapd/overlays/pcache.c b/servers/slapd/overlays/pcache.c index 8361956088..7719338942 100644 --- a/servers/slapd/overlays/pcache.c +++ b/servers/slapd/overlays/pcache.c @@ -1631,7 +1631,7 @@ pcache_response( return SLAP_CB_CONTINUE; } -static void +static int add_filter_attrs( Operation *op, AttributeName** new_attrs, @@ -1689,6 +1689,8 @@ add_filter_attrs( j++; } BER_BVZERO( &(*new_attrs)[j].an_name ); + + return count; } /* NOTE: this is a quick workaround to let pcache minimally interact @@ -1833,7 +1835,8 @@ pcache_op_search( query.filter = filter_dup(op->ors_filter, NULL); ldap_pvt_thread_rdwr_wlock(&qtemp->t_rwlock); if ( !qtemp->t_attrs.count ) { - add_filter_attrs(op, &qtemp->t_attrs.attrs, + qtemp->t_attrs.count = add_filter_attrs(op, + &qtemp->t_attrs.attrs, &qm->attr_sets[attr_set], filter_attrs, fattr_cnt, fattr_got_oc); }