1
0
mirror of https://github.com/samba-team/samba.git synced 2025-07-30 19:42:05 +03:00

s3: libsmb: Ensure we disconnect the temporary SMB1 tcon pointer on failure to set up encryption.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13992

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
This commit is contained in:
Jeremy Allison
2021-01-28 14:32:53 -08:00
parent 068f4a977f
commit faba89ad59

View File

@ -1203,6 +1203,13 @@ bool cli_check_msdfs_proxy(TALLOC_CTX *ctx,
break;
case SMB_ENCRYPTION_REQUIRED:
default:
/*
* Failed to set up encryption.
* Disconnect the temporary IPC$
* tcon before restoring the original
* tcon so we don't leak it.
*/
cli_tdis(cli);
cli_state_restore_tcon(cli, orig_tcon);
return false;
}