From 410638fda133a0b8ae60fe832832a5acb3761250 Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Tue, 19 Apr 2005 14:31:07 +0000 Subject: [PATCH] fix memory leak (ITS#3669) --- servers/slapd/back-meta/search.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/servers/slapd/back-meta/search.c b/servers/slapd/back-meta/search.c index 36254eeee3..43f5c2062c 100644 --- a/servers/slapd/back-meta/search.c +++ b/servers/slapd/back-meta/search.c @@ -754,6 +754,7 @@ meta_send_entry( NULL ); } BER_BVZERO( &attr->a_nvals[i] ); + } else { attr->a_nvals = attr->a_vals; } @@ -771,6 +772,9 @@ meta_send_entry( attr = ent.e_attrs; ent.e_attrs = attr->a_next; if ( attr->a_vals != &slap_dummy_bv ) { + if ( attr->a_nvals != attr->a_vals ) { + ber_bvarray_free( attr->a_nvals ); + } ber_bvarray_free( attr->a_vals ); } free( attr ); -- 2.39.5