Skip to content
Commit 30aecae8 authored by Andrew Price's avatar Andrew Price Committed by Andreas Gruenbacher
Browse files

gfs2: Fix memory leak when gfs2meta's fs_context is freed



gfs2 and gfs2meta share an ->init_fs_context function which allocates an
args structure stored in fc->fs_private. gfs2 registers a ->free
function to free this memory when the fs_context is cleaned up, but
there was not one registered for gfs2meta, causing a leak.

Register a ->free function for gfs2meta. The existing gfs2_fc_free
function does what we need.

Reported-by: default avatar <syzbot+c2fdfd2b783754878fb6@syzkaller.appspotmail.com>
Fixes: 1f52aa08 ("gfs2: Convert gfs2 to fs_context")
Signed-off-by: default avatarAndrew Price <anprice@redhat.com>
Signed-off-by: default avatarBob Peterson <rpeterso@redhat.com>
Signed-off-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
parent 7d194c21
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