mirror of
https://github.com/samba-team/samba.git
synced 2025-01-22 22:04:08 +03:00
ldap_server: Avoid talloc_memdup() for ldap_decode()
Slight optimization for the ldap server: We don't need to copy the client PDU into the ASN1 struct, the decoding process happens immediately in the same routine. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
This commit is contained in:
parent
0cb61c6fb6
commit
86ab467667
@ -589,10 +589,7 @@ static void ldapsrv_call_read_done(struct tevent_req *subreq)
|
||||
return;
|
||||
}
|
||||
|
||||
if (!asn1_load(asn1, blob)) {
|
||||
ldapsrv_terminate_connection(conn, "asn1_load failed");
|
||||
return;
|
||||
}
|
||||
asn1_load_nocopy(asn1, blob.data, blob.length);
|
||||
|
||||
limits.max_search_size =
|
||||
lpcfg_ldap_max_search_request_size(conn->lp_ctx);
|
||||
|
Loading…
x
Reference in New Issue
Block a user