aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn/sc
diff options
context:
space:
mode:
authorJesper Juhl <jesper.juhl@gmail.com>2006-06-23 05:05:27 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-23 10:43:04 -0400
commit94a6735cd67375029c2092e6d46f14b2721e6793 (patch)
tree1d9479e9c2900cdaf1ec7ded1b7a917c8528a3d8 /drivers/isdn/sc
parent2eebb1925d25cfd7e7cd2eb18ac4d4e6d189dba0 (diff)
[PATCH] i4l: memory leak fix for sc_ioctl().
Fix leak of `rcvmsg' in sc_ioctl(). There are two returns in the switch in sc_ioctl (the SCIOCSTART case) that may leak `rcvmsg'. This patch fixes that by adding a kfree() call at the beginning of that case. Bug found by the coverity checker as #1098 Eric Sesterhenn send me a patch to fix the leak(s) by adding 2 kfree() calls before the returns, I changed that into just a single call at the beginning. Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Cc: Karsten Keil <kkeil@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/isdn/sc')
-rw-r--r--drivers/isdn/sc/ioctl.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/isdn/sc/ioctl.c b/drivers/isdn/sc/ioctl.c
index f4f71226a078..57c4ab96d136 100644
--- a/drivers/isdn/sc/ioctl.c
+++ b/drivers/isdn/sc/ioctl.c
@@ -97,6 +97,7 @@ int sc_ioctl(int card, scs_ioctl *data)
97 97
98 case SCIOCSTART: 98 case SCIOCSTART:
99 { 99 {
100 kfree(rcvmsg);
100 pr_debug("%s: SCIOSTART: ioctl received\n", 101 pr_debug("%s: SCIOSTART: ioctl received\n",
101 sc_adapter[card]->devicename); 102 sc_adapter[card]->devicename);
102 if(sc_adapter[card]->EngineUp) { 103 if(sc_adapter[card]->EngineUp) {