[Date Prev][Date Next]
(ITS#4550) back-ldap frees constant err string
Full_Name: Howard Chu
Submission from: (NULL) (184.108.40.206)
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.