* [PATCH 2/2] staging: comedi: fix memory leak
@ 2010-11-13 18:46 Nicolas Kaiser
0 siblings, 0 replies; only message in thread
From: Nicolas Kaiser @ 2010-11-13 18:46 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Ian Abbott, Frank Mori Hess, devel, kernel-janitors, linux-kernel
Instead of freeing outBuffer, inBuffer gets freed twice.
Signed-off-by: Nicolas Kaiser <nikai@nikai.net>
---
Only compile tested. I hope I got it right?
drivers/staging/comedi/drivers/usbdux.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/comedi/drivers/usbdux.c b/drivers/staging/comedi/drivers/usbdux.c
index aca4d14..696ee04 100644
--- a/drivers/staging/comedi/drivers/usbdux.c
+++ b/drivers/staging/comedi/drivers/usbdux.c
@@ -2295,8 +2295,8 @@ static void tidy_up(struct usbduxsub *usbduxsub_tmp)
usbduxsub_tmp->inBuffer = NULL;
kfree(usbduxsub_tmp->insnBuffer);
usbduxsub_tmp->insnBuffer = NULL;
- kfree(usbduxsub_tmp->inBuffer);
- usbduxsub_tmp->inBuffer = NULL;
+ kfree(usbduxsub_tmp->outBuffer);
+ usbduxsub_tmp->outBuffer = NULL;
kfree(usbduxsub_tmp->dac_commands);
usbduxsub_tmp->dac_commands = NULL;
kfree(usbduxsub_tmp->dux_commands);
--
1.7.2.2
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2010-11-13 18:46 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-13 18:46 [PATCH 2/2] staging: comedi: fix memory leak Nicolas Kaiser
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox