Messages in this thread Patch in this message | | | Date | Wed, 16 Apr 2008 21:44:23 +0400 | From | Cyrill Gorcunov <> | Subject | [patch 2/3] 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 <gorcunov@gmail.com>
---
Index: linux-2.6.git/drivers/isdn/capi/capifs.c =================================================================== --- linux-2.6.git.orig/drivers/isdn/capi/capifs.c 2008-04-16 20:14:46.000000000 +0400 +++ linux-2.6.git/drivers/isdn/capi/capifs.c 2008-04-16 20:16:58.000000000 +0400 @@ -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; } --
| |