openldap: properly free allocated resources on transient errors