Note that res parameter of ldap_search_ext_s() and ldap_search_s() should be freed with ldap_msgfree() regardless of return value of these functions.
Please see the attached patch which frees the search_message in the above case.
Thanks
pgsql-hackers by date:
Соглашаюсь с условиями обработки персональных данных