Skip to content
Commit a6579cbf authored by Colin Ian King's avatar Colin Ian King Committed by Andreas Gruenbacher
Browse files

gfs2: Fix memory leak of object lsi on error return path

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: 97fd734b

 ("gfs2: lookup local statfs inodes prior to journal recovery")
Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
Signed-off-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
parent 2734d6c1
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment