Log Message: add patch from upstream to fix possible crash on LDAP cleanup (LDAP support is optional, not enabled per default)