]> git.baikalelectronics.ru Git - kernel.git/commit
fs/cifs: Fix resource leak
authorKhaled ROMDHANI <khaledromdhani216@gmail.com>
Tue, 4 May 2021 15:38:55 +0000 (16:38 +0100)
committerSteve French <stfrench@microsoft.com>
Tue, 4 May 2021 16:53:15 +0000 (11:53 -0500)
commit488dd52095d0e752989317d3dbabcc011826b07b
tree8f7c59f39cbee8d7758280737ac26eed88c4b2d8
parent529fa51e9cfae81d3e7a092eb5d2d414a55ca2dd
fs/cifs: Fix resource leak

The -EIO error return path is leaking memory allocated
to page. Fix this by moving the allocation block after
the check of cifs_forced_shutdown.

Addresses-Coverity: ("Resource leak")
Fixes: a5833611e332 ("cifs: add shutdown support")
Signed-off-by: Khaled ROMDHANI <khaledromdhani216@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/link.c