From: Cyrill Gorcunov capifs_remount may reach 'return' statement without freeing of memory allocated by kstrdup call Signed-off-by: Cyrill Gorcunov Cc: Karsten Keil Signed-off-by: Andrew Morton --- drivers/isdn/capi/capifs.c | 1 + 1 file changed, 1 insertion(+) diff -puN drivers/isdn/capi/capifs.c~capifs-fix-memory-leak-on-remount drivers/isdn/capi/capifs.c --- a/drivers/isdn/capi/capifs.c~capifs-fix-memory-leak-on-remount +++ a/drivers/isdn/capi/capifs.c @@ -69,6 +69,7 @@ static int capifs_remount(struct super_b } 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; } _