From: Cyrill Gorcunov Date: Mon, 28 Apr 2008 09:14:41 +0000 (-0700) Subject: capifs: fix memory leak on remount X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c24e9b3fa3fdfca3834eba0bb217c8c197a43b7e;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git capifs: fix memory leak on remount 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 Signed-off-by: Linus Torvalds --- diff --git a/drivers/isdn/capi/capifs.c b/drivers/isdn/capi/capifs.c index eafe0e9daa7..550e80f390a 100644 --- a/drivers/isdn/capi/capifs.c +++ b/drivers/isdn/capi/capifs.c @@ -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; }