Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c24e9b3f authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Linus Torvalds
Browse files

capifs: fix memory leak on remount



capifs_remount may reach 'return' statement without freeing of memory
allocated by kstrdup call

Signed-off-by: default avatarCyrill Gorcunov <gorcunov@gmail.com>
Cc: Karsten Keil <kkeil@suse.de>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 30d55e71
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -69,6 +69,7 @@ static int capifs_remount(struct super_block *s, int *flags, char *data)
		} else if (sscanf(this_char, "mode=%o%c", &n, &dummy) == 1)
			mode = n & ~S_IFMT;
		else {
			kfree(new_opt);
			printk("capifs: called with bogus options\n");
			return -EINVAL;
		}