[Date Prev][Date Next] [Chronological] [Thread] [Top]

Memory leak in ldbm backend of slapd (ITS#674)



Full_Name: Tjeerd van Lemel
Version: 2.0 beta
OS: Tru64 Unix 4.0
URL: ftp://ftp.openldap.org/incoming/Tjeerd-van-Lemel-000818.1
Submission from: (NULL) (195.109.155.66)


The function index_param() in servers/slapd/back_ldbm/index.c assigns *prefixp
with ber_bvstrdup() allocated data if it returns successfully. This function is
called from 3 places in servers/slapd/back_ldbm/filterindex.c (and from nowhere
else). The allocated data (pointed to by the variable 'prefix') is never freed.
This freeing should *always* be done (with ber_bvfree()) if index_param()
returns LDAP_SUCCESS, even if the calling functions itself doesn't return
successfully after the call of index_param().