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.karo-electronics.de/?a=commitdiff_plain;h=c24e9b3fa3fdfca3834eba0bb217c8c197a43b7e;p=linux-beck.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 eafe0e9daa7c..550e80f390a6 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; }