fix more memory leaks in the LDAP backend code; patches from metze