From: Volker Lendecke Date: Tue, 15 Dec 2020 16:15:21 +0000 (+0100) Subject: libsmbclient: Avoid a call to SMBC_errno() in SMBC_attr_server() X-Git-Tag: ldb-2.5.0~1001 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=009b6e748ea67215f6bd593fc57af3b6b48b09a0;p=thirdparty%2Fsamba.git libsmbclient: Avoid a call to SMBC_errno() in SMBC_attr_server() I think this also fixes the errno return, cli_shutdown() can do a lot and set errno in between. Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- diff --git a/source3/libsmb/libsmb_server.c b/source3/libsmb/libsmb_server.c index 5a1055ba773..3ac915e775d 100644 --- a/source3/libsmb/libsmb_server.c +++ b/source3/libsmb/libsmb_server.c @@ -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; }