X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=libraries%2Flibldap%2Frequest.c;h=aa805108beb5f5dc08ceef14803ca24afd3c9b9d;hb=59e9ff6243465640956b58ad1756a3ede53eca7c;hp=c2d6dd445da85bebc267cb70bf4580d798880261;hpb=207a43dac2eef40f77c44afeb7de064344b1410b;p=openldap diff --git a/libraries/libldap/request.c b/libraries/libldap/request.c index c2d6dd445d..aa805108be 100644 --- a/libraries/libldap/request.c +++ b/libraries/libldap/request.c @@ -1,7 +1,7 @@ /* $OpenLDAP$ */ /* This work is part of OpenLDAP Software . * - * Copyright 1998-2015 The OpenLDAP Foundation. + * Copyright 1998-2018 The OpenLDAP Foundation. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -315,6 +315,7 @@ ldap_send_server_request( 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; } @@ -334,6 +335,7 @@ ldap_send_server_request( rc = -1; } if ( rc ) { + ber_free( ber, 1 ); LDAP_CONN_UNLOCK_IF(m_noconn); return rc; } @@ -1071,7 +1073,7 @@ static int ldap_int_nextref( * 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 *