]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
libsmbclient: Avoid a call to SMBC_errno() in SMBC_attr_server()
authorVolker Lendecke <vl@samba.org>
Tue, 15 Dec 2020 16:15:21 +0000 (17:15 +0100)
committerJeremy Allison <jra@samba.org>
Fri, 6 Aug 2021 17:22:30 +0000 (17:22 +0000)
I think this also fixes the errno return, cli_shutdown() can do a lot and set
errno in between.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/libsmb/libsmb_server.c

index 5a1055ba773c4e693ea79aebbbc56a6753fc3dd1..3ac915e775d123efab6436f5ed6465fb654f5639 100644 (file)
@@ -854,9 +854,9 @@ SMBC_attr_server(TALLOC_CTX *ctx,
                         &ipc_srv->pol);
 
                 if (!NT_STATUS_IS_OK(nt_status)) {
-                        errno = SMBC_errno(context, ipc_srv->cli);
                         cli_shutdown(ipc_srv->cli);
                         free(ipc_srv);
+                       errno = cli_status_to_errno(nt_status);
                         return NULL;
                 }