mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-24 00:29:35 -05:00
cleanup; plug potential leak?
This commit is contained in:
parent
d02a8cab65
commit
922a7e4488
1 changed files with 5 additions and 5 deletions
|
|
@ -746,7 +746,7 @@ slap_send_search_entry( Operation *op, SlapReply *rs )
|
|||
{
|
||||
BerElementBuffer berbuf;
|
||||
BerElement *ber = (BerElement *) &berbuf;
|
||||
Attribute *a, *aa;
|
||||
Attribute *a, *aa = NULL;
|
||||
int i, j, rc=-1, bytes;
|
||||
char *edn;
|
||||
int userattrs;
|
||||
|
|
@ -1196,7 +1196,6 @@ slap_send_search_entry( Operation *op, SlapReply *rs )
|
|||
if ( op->o_res_ber == NULL ) ber_free_buf( ber );
|
||||
send_ldap_error( op, rs, LDAP_OTHER,
|
||||
"encoding description error" );
|
||||
attrs_free( aa );
|
||||
goto error_return;
|
||||
}
|
||||
|
||||
|
|
@ -1238,7 +1237,6 @@ slap_send_search_entry( Operation *op, SlapReply *rs )
|
|||
if ( op->o_res_ber == NULL ) ber_free_buf( ber );
|
||||
send_ldap_error( op, rs, LDAP_OTHER,
|
||||
"encoding values error" );
|
||||
attrs_free( aa );
|
||||
goto error_return;
|
||||
}
|
||||
}
|
||||
|
|
@ -1257,7 +1255,6 @@ slap_send_search_entry( Operation *op, SlapReply *rs )
|
|||
|
||||
if ( op->o_res_ber == NULL ) ber_free_buf( ber );
|
||||
send_ldap_error( op, rs, LDAP_OTHER, "encode end error" );
|
||||
attrs_free( aa );
|
||||
goto error_return;
|
||||
}
|
||||
}
|
||||
|
|
@ -1308,7 +1305,6 @@ slap_send_search_entry( Operation *op, SlapReply *rs )
|
|||
e_flags = NULL;
|
||||
}
|
||||
|
||||
attrs_free( aa );
|
||||
rc = ber_printf( ber, /*{{*/ "}N}" );
|
||||
|
||||
if( rc != -1 ) {
|
||||
|
|
@ -1388,6 +1384,10 @@ error_return:;
|
|||
slap_sl_free( e_flags, op->o_tmpmemctx );
|
||||
}
|
||||
|
||||
if ( aa ) {
|
||||
attrs_free( aa );
|
||||
}
|
||||
|
||||
if ( op->o_callback ) {
|
||||
slap_callback *sc = op->o_callback,
|
||||
*sc_next = op->o_callback;
|
||||
|
|
|
|||
Loading…
Reference in a new issue