Fixed a few memory leaks in LDAP search results handling.