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

(ITS#4550) back-ldap frees constant err string

Full_Name: Howard Chu
Version: 2.3/HEAD
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (
Submitted by: hyc

In ldap_back_search ldap_parse_result is called to set rs->sr_text, followed by
slap_map_api2result(). For some error codes, slap_map_api2result() overwrites
rs->sr_text with constant strings. At cleanup time, rs->sr_text gets freed,
which causes a crash.

Perhaps slap_map_api2result() should only set sr_text if it's already NULL, to
avoid a memory leak. back-ldap/search.c also needs a fix.