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>
(cherry picked from commit
faba89ad59eaa189f325be17377645862080a965)
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;
}