From f5bfd3418a8386ebd3adac1537d49ab1bd6aa15c Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Tue, 19 Apr 2005 14:31:39 +0000 Subject: [PATCH] import fix memory leak from HEAD (ITS#3669) --- CHANGES | 3 ++- servers/slapd/back-meta/search.c | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index dd121b049a..95097e77c6 100644 --- a/CHANGES +++ b/CHANGES @@ -1,7 +1,8 @@ OpenLDAP 2.2 Change Log -OpenLDAP 2.2.24 Engineering +OpenLDAP 2.2.25 Engineering Fixed back-bdb ctxcsn/LRU bug (ITS#3666) + Fixed back-meta memory leak (ITS#3669) OpenLDAP 2.2.24 Release Fixed slapd "chldren:" typo (ITS#3560) diff --git a/servers/slapd/back-meta/search.c b/servers/slapd/back-meta/search.c index 1467ada56f..77c63189f5 100644 --- a/servers/slapd/back-meta/search.c +++ b/servers/slapd/back-meta/search.c @@ -727,6 +727,9 @@ meta_send_entry( attr = ent.e_attrs; ent.e_attrs = attr->a_next; if ( attr->a_vals != &dummy ) { + if ( attr->a_nvals != attr->a_vals ) { + ber_bvarray_free( attr->a_nvals ); + } ber_bvarray_free( attr->a_vals ); } free( attr );