]> git.sur5r.net Git - openldap/commitdiff
plug leak
authorPierangelo Masarati <ando@openldap.org>
Mon, 13 Aug 2007 16:29:04 +0000 (16:29 +0000)
committerPierangelo Masarati <ando@openldap.org>
Mon, 13 Aug 2007 16:29:04 +0000 (16:29 +0000)
servers/slapd/overlays/pcache.c

index 8361956088ff96feebf6a215b4dd1a062d8df344..77193389423e131b142ec51d38eb0cba71db27c1 100644 (file)
@@ -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);
                }