From: Kurt Zeilenga Date: Mon, 28 Dec 1998 00:39:50 +0000 (+0000) Subject: Plug 'matched' memory leak in dn2entry() X-Git-Tag: OPENLDAP_SLAPD_BACK_LDAP~851 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=97f10a99cc40c05c2b63177530566a8745f6d0cf;p=openldap Plug 'matched' memory leak in dn2entry() --- 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 );