libsmbclient: Avoid a call to SMBC_errno() in SMBC_open_ctx()
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)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/libsmb/libsmb_file.c

index e9db36e00da9bff9c69dd76338e543e03ae2731f..3aacb1ef81e46555c69f1483d93b7acaf6327dd8 100644 (file)
@@ -136,8 +136,8 @@ SMBC_open_ctx(SMBCCTX *context,
                        /* Handle the error ... */
 
                        SAFE_FREE(file);
-                       errno = SMBC_errno(context, targetcli);
                        TALLOC_FREE(frame);
+                       errno = cli_status_to_errno(status);
                        return NULL;
                }