Commit 3e36a163 authored by Wei Yongjun's avatar Wei Yongjun Committed by Theodore Ts'o
Browse files

ext4: fix possible memory leak in ext4_remount()

'orig_data' is malloced in ext4_remount() and should be freed
before leaving from the error handling cases, otherwise it will
cause memory leak.

Signed-off-by: default avatarWei Yongjun <>
Signed-off-by: default avatar"Theodore Ts'o" <>
Reviewed-by: default avatarLukas Czerner <>
parent df05c1b8
......@@ -4543,6 +4543,7 @@ static int ext4_remount(struct super_block *sb, int *flags, char *data)
if (!old_opts.s_qf_names[i]) {
for (j = 0; j < i; j++)
return -ENOMEM;
} else
Supports Markdown
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