Commit 922a7e44 authored by Pierangelo Masarati's avatar Pierangelo Masarati
Browse files

cleanup; plug potential leak?

parent d02a8cab
......@@ -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;
......
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