summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2006-07-25 12:48:40 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:10:22 -0500
commitec8d486e267b60ebad3eac937580986155b75914 (patch)
tree8a3f04ca7a126371794a5269c21b0121ca6fe6cd /source4
parent8a3f6a7912bb86ccb2a60da7016042a6f5bf3c86 (diff)
downloadsamba-ec8d486e267b60ebad3eac937580986155b75914.tar.gz
samba-ec8d486e267b60ebad3eac937580986155b75914.tar.bz2
samba-ec8d486e267b60ebad3eac937580986155b75914.zip
r17230: don't overwrite the error with NT_STATUS_NO_MEMORY
metze (This used to be commit f2196bf9b662d3f38d59eceb8c54f9d2e3f7b505)
Diffstat (limited to 'source4')
-rw-r--r--source4/libcli/ldap/ldap_bind.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/source4/libcli/ldap/ldap_bind.c b/source4/libcli/ldap/ldap_bind.c
index f1f7872455..4fdd87a25b 100644
--- a/source4/libcli/ldap/ldap_bind.c
+++ b/source4/libcli/ldap/ldap_bind.c
@@ -377,16 +377,13 @@ NTSTATUS ldap_bind_sasl(struct ldap_connection *conn, struct cli_credentials *cr
ldap_read_io_handler,
conn,
&sasl_socket);
- if (NT_STATUS_IS_OK(status)) {
- talloc_steal(conn->sock, sasl_socket);
- talloc_unlink(conn, conn->sock);
- conn->sock = sasl_socket;
- packet_set_socket(conn->packet, conn->sock);
- } else {
- status = NT_STATUS_NO_MEMORY;
- goto failed;
- }
-
+ if (!NT_STATUS_IS_OK(status)) goto failed;
+
+ talloc_steal(conn->sock, sasl_socket);
+ talloc_unlink(conn, conn->sock);
+ conn->sock = sasl_socket;
+ packet_set_socket(conn->packet, conn->sock);
+
conn->bind.type = LDAP_BIND_SASL;
conn->bind.creds = creds;
}