From 97f10a99cc40c05c2b63177530566a8745f6d0cf Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Mon, 28 Dec 1998 00:39:50 +0000 Subject: [PATCH] Plug 'matched' memory leak in dn2entry() --- servers/slapd/back-ldbm/dn2id.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/servers/slapd/back-ldbm/dn2id.c b/servers/slapd/back-ldbm/dn2id.c index b5ca2a4c7c..ca8c209b6f 100644 --- a/servers/slapd/back-ldbm/dn2id.c +++ b/servers/slapd/back-ldbm/dn2id.c @@ -189,6 +189,9 @@ dn2entry( if ( (pdn = dn_parent( be, dn )) != NULL ) { /* get entry with reader lock */ if ( (e = dn2entry_r( be, pdn, matched )) != NULL ) { + if(*matched != NULL) { + free(*matched); + } *matched = pdn; /* free entry with reader lock */ cache_return_entry_r( &li->li_cache, e ); -- 2.39.5