/* $OpenLDAP$ */
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
*
- * Copyright 1998-2016 The OpenLDAP Foundation.
+ * Copyright 1998-2018 The OpenLDAP Foundation.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
LDAP_MUTEX_UNLOCK( &ld->ld_options.ldo_mutex );
if ( rc == -1 ) {
ld->ld_errno = LDAP_ENCODING_ERROR;
+ ber_free( ber, 1 );
LDAP_CONN_UNLOCK_IF(m_noconn);
return rc;
}
rc = -1;
}
if ( rc ) {
+ ber_free( ber, 1 );
LDAP_CONN_UNLOCK_IF(m_noconn);
return rc;
}
* The array will be free'd by this function when no longer needed
* (IN) sref != 0 if following search reference
* (OUT) errstrp = Place to return a string of referrals which could not be followed
- * (OUT) hadrefp = 1 if sucessfully followed referral
+ * (OUT) hadrefp = 1 if successfully followed referral
*
* Return value - number of referrals followed
*