Skip to content

Commit

Permalink
capifs: fix memory leak on remount
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
cyrillos authored and torvalds committed Apr 28, 2008
1 parent 30d55e7 commit c24e9b3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/isdn/capi/capifs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit c24e9b3

Please sign in to comment.