diff options
author | Cyrill Gorcunov <gorcunov@gmail.com> | 2008-04-28 05:14:41 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-28 11:58:34 -0400 |
commit | c24e9b3fa3fdfca3834eba0bb217c8c197a43b7e (patch) | |
tree | 1b86c5238426d9d09595466cb4fe393d218b8b4e /drivers/isdn/capi | |
parent | 30d55e71a81b1f5a8136f191dc9f4c21f18e77e6 (diff) |
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 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) | |||
69 | } else if (sscanf(this_char, "mode=%o%c", &n, &dummy) == 1) | 69 | } else if (sscanf(this_char, "mode=%o%c", &n, &dummy) == 1) |
70 | mode = n & ~S_IFMT; | 70 | mode = n & ~S_IFMT; |
71 | else { | 71 | else { |
72 | kfree(new_opt); | ||
72 | printk("capifs: called with bogus options\n"); | 73 | printk("capifs: called with bogus options\n"); |
73 | return -EINVAL; | 74 | return -EINVAL; |
74 | } | 75 | } |