提交 47c886b3 编写于 作者: S Steve French

[CIFS] Fix oops in cifs_readpages caused by not checking buf_type in an

error path of new cifs_readpages code.
Signed-off-by: NSteve French <sfrench@us.ibm.com>
上级 d65177c1
......@@ -1754,6 +1754,9 @@ static int cifs_readpages(struct file *file, struct address_space *mapping,
/* need to free smb_read_data buf before exit */
if (smb_read_data) {
if(buf_type == CIFS_SMALL_BUFFER)
cifs_small_buf_release(smb_read_data);
else if(buf_type == CIFS_LARGE_BUFFER)
cifs_buf_release(smb_read_data);
smb_read_data = NULL;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册