[SCM] Samba Shared Repository - branch master updated
Volker Lendecke
vlendec at samba.org
Mon Aug 17 11:11:01 UTC 2020
The branch, master has been updated
via 3514e4100cc ldap_server: Do an early TALLOC_FREE()
via 86ab4676676 ldap_server: Avoid talloc_memdup() for ldap_decode()
from 0cb61c6fb6a ctdb-doc: Link to CTDB page in wiki
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 3514e4100cc87c840dba43715f84f0b04162c354
Author: Volker Lendecke <vl at samba.org>
Date: Mon Aug 10 14:48:45 2020 +0200
ldap_server: Do an early TALLOC_FREE()
We don't need the asn1 struct after this point anymore
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Andreas Schneider <asn at samba.org>
Autobuild-User(master): Volker Lendecke <vl at samba.org>
Autobuild-Date(master): Mon Aug 17 11:10:04 UTC 2020 on sn-devel-184
commit 86ab46766768dd3fee40f6c61431395fb099fb73
Author: Volker Lendecke <vl at samba.org>
Date: Mon Aug 10 14:47:26 2020 +0200
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 at samba.org>
Reviewed-by: Andreas Schneider <asn at samba.org>
-----------------------------------------------------------------------
Summary of changes:
source4/ldap_server/ldap_server.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source4/ldap_server/ldap_server.c b/source4/ldap_server/ldap_server.c
index ee82a30912f..5a078aaa64f 100644
--- a/source4/ldap_server/ldap_server.c
+++ b/source4/ldap_server/ldap_server.c
@@ -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);
@@ -607,6 +604,7 @@ static void ldapsrv_call_read_done(struct tevent_req *subreq)
}
data_blob_free(&blob);
+ TALLOC_FREE(asn1);
/* queue the call in the global queue */
--
Samba Shared Repository
More information about the samba-cvs
mailing list