From: Stefan Metzmacher Date: Thu, 11 May 2017 19:17:40 +0000 (+0200) Subject: s4:ldap_server: drop the connection if we fail to allocate ldapsrv_sasl_postprocess_c... X-Git-Tag: ldb-1.1.31~44 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bd0a987c5cd301d6ed4c53f7ff1118cce81901a3;p=thirdparty%2Fsamba.git s4:ldap_server: drop the connection if we fail to allocate ldapsrv_sasl_postprocess_context Signed-off-by: Stefan Metzmacher Reviewed-by: Andrew Bartlett --- diff --git a/source4/ldap_server/ldap_bind.c b/source4/ldap_server/ldap_bind.c index 451f9d5b56b..64ee1b3ba22 100644 --- a/source4/ldap_server/ldap_bind.c +++ b/source4/ldap_server/ldap_bind.c @@ -442,9 +442,8 @@ static NTSTATUS ldapsrv_BindSASL(struct ldapsrv_call *call) gensec_have_feature(conn->gensec, GENSEC_FEATURE_SEAL)) { context = talloc(call, struct ldapsrv_sasl_postprocess_context); - - if (!context) { - status = NT_STATUS_NO_MEMORY; + if (context == NULL) { + return NT_STATUS_NO_MEMORY; } }