diff options
author | Cyrill Gorcunov <gorcunov@gmail.com> | 2008-04-28 02:14:41 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-28 08:58:34 -0700 |
commit | c24e9b3fa3fdfca3834eba0bb217c8c197a43b7e (patch) | |
tree | 1b86c5238426d9d09595466cb4fe393d218b8b4e /drivers/isdn/capi | |
parent | 30d55e71a81b1f5a8136f191dc9f4c21f18e77e6 (diff) | |
download | op-kernel-dev-c24e9b3fa3fdfca3834eba0bb217c8c197a43b7e.zip op-kernel-dev-c24e9b3fa3fdfca3834eba0bb217c8c197a43b7e.tar.gz |
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>
Cc: Karsten Keil <kkeil@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/isdn/capi')
-rw-r--r-- | drivers/isdn/capi/capifs.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/isdn/capi/capifs.c b/drivers/isdn/capi/capifs.c index eafe0e9..550e80f 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; } |