diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c index 7bbb0cb6169614fadbb31db0fbcb82d4a88f6a16..2a6e9816dc22609b14a9a0945b49dbcf07ccd48a 100644 --- a/fs/cifs/smb2pdu.c +++ b/fs/cifs/smb2pdu.c @@ -888,7 +888,8 @@ int smb3_validate_negotiate(const unsigned int xid, struct cifs_tcon *tcon) * not supported error. Client should accept it. */ cifs_dbg(VFS, "Server does not support validate negotiate\n"); - return 0; + rc = 0; + goto out_free_inbuf; } else if (rc != 0) { cifs_dbg(VFS, "validate protocol negotiate failed: %d\n", rc); rc = -EIO;