[patch] afs: passing an ERR_PTR() to page_cache_release()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In the error handling we try to release "page" if it's not NULL.

Signed-off-by: Dan Carpenter <error27@xxxxxxxxx>

diff --git a/fs/afs/mntpt.c b/fs/afs/mntpt.c
index 5e813a8..f9b23a7 100644
--- a/fs/afs/mntpt.c
+++ b/fs/afs/mntpt.c
@@ -165,6 +165,7 @@ static struct vfsmount *afs_mntpt_do_automount(struct dentry *mntpt)
 	page = read_mapping_page(mntpt->d_inode->i_mapping, 0, NULL);
 	if (IS_ERR(page)) {
 		ret = PTR_ERR(page);
+		page = NULL;
 		goto error;
 	}
 
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux