]> git.sur5r.net Git - openldap/commitdiff
Plug 'matched' memory leak in dn2entry()
authorKurt Zeilenga <kurt@openldap.org>
Mon, 28 Dec 1998 00:39:50 +0000 (00:39 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Mon, 28 Dec 1998 00:39:50 +0000 (00:39 +0000)
servers/slapd/back-ldbm/dn2id.c

index b5ca2a4c7c0d84d61996629d46e5e45c86f1b2bd..ca8c209b6ff9f59f3ef1b9deddf584832214eea6 100644 (file)
@@ -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 );