summaryrefslogtreecommitdiff
path: root/drivers/isdn/capi
diff options
context:
space:
mode:
authorCyrill Gorcunov <gorcunov@gmail.com>2008-04-28 02:14:41 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-28 08:58:34 -0700
commitc24e9b3fa3fdfca3834eba0bb217c8c197a43b7e (patch)
tree1b86c5238426d9d09595466cb4fe393d218b8b4e /drivers/isdn/capi
parent30d55e71a81b1f5a8136f191dc9f4c21f18e77e6 (diff)
downloadlwn-c24e9b3fa3fdfca3834eba0bb217c8c197a43b7e.tar.gz
lwn-c24e9b3fa3fdfca3834eba0bb217c8c197a43b7e.zip
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.c1
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)
} 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;
}