Commit 2c6e6a9e authored by Howard Chu's avatar Howard Chu Committed by Quanah Gibson-Mount
Browse files

ITS#8782 plug memleaks in cancel

parent 28c0ba84
......@@ -42,14 +42,14 @@ ldap_cancel(
int *msgidp )
{
BerElement *cancelidber = NULL;
struct berval *cancelidvalp = NULL;
struct berval cancelidvalp = { 0, NULL };
int rc;
cancelidber = ber_alloc_t( LBER_USE_DER );
ber_printf( cancelidber, "{i}", cancelid );
ber_flatten( cancelidber, &cancelidvalp );
ber_flatten2( cancelidber, &cancelidvalp, 0 );
rc = ldap_extended_operation( ld, LDAP_EXOP_CANCEL,
cancelidvalp, sctrls, cctrls, msgidp );
&cancelidvalp, sctrls, cctrls, msgidp );
ber_free( cancelidber, 1 );
return rc;
}
......@@ -62,14 +62,14 @@ ldap_cancel_s(
LDAPControl **cctrls )
{
BerElement *cancelidber = NULL;
struct berval *cancelidvalp = NULL;
struct berval cancelidvalp = { 0, NULL };
int rc;
cancelidber = ber_alloc_t( LBER_USE_DER );
ber_printf( cancelidber, "{i}", cancelid );
ber_flatten( cancelidber, &cancelidvalp );
ber_flatten2( cancelidber, &cancelidvalp, 0 );
rc = ldap_extended_operation_s( ld, LDAP_EXOP_CANCEL,
cancelidvalp, sctrls, cctrls, NULL, NULL );
&cancelidvalp, sctrls, cctrls, NULL, NULL );
ber_free( cancelidber, 1 );
return rc;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment