Colin Ian King c4aaad8a33 gfs2: Fix memory leak of object lsi on error return path
[ Upstream commit a6579cbfd7216b071008db13360c322a6b21400b ]

In the case where IS_ERR(lsi->si_sc_inode) is true the error exit path
to free_local does not kfree the allocated object lsi leading to a memory
leak. Fix this by kfree'ing lst before taking the error exit path.

Addresses-Coverity: ("Resource leak")
Fixes: 97fd734ba17e ("gfs2: lookup local statfs inodes prior to journal recovery")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-09-15 09:50:32 +02:00
..
2021-09-08 08:49:01 +02:00
2020-10-16 11:11:22 -07:00
2021-09-08 08:49:01 +02:00
2021-07-14 16:55:59 +02:00
2021-09-08 08:49:01 +02:00
2021-09-08 08:49:01 +02:00
2021-08-04 12:46:40 +02:00
2021-09-08 08:49:01 +02:00
2021-07-14 16:56:12 +02:00
2020-09-10 14:03:31 -07:00
2021-07-19 09:44:51 +02:00
2020-10-23 11:33:41 -07:00
2020-10-23 11:33:41 -07:00
2020-10-24 12:40:18 -07:00