[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20101113194650.28a0be1b@absol.kitzblitz>
Date: Sat, 13 Nov 2010 19:46:50 +0100
From: Nicolas Kaiser <nikai@...ai.net>
To: Greg Kroah-Hartman <gregkh@...e.de>
Cc: Ian Abbott <abbotti@....co.uk>,
Frank Mori Hess <fmhess@...rs.sourceforge.net>,
devel@...verdev.osuosl.org, kernel-janitors@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH 2/2] staging: comedi: fix memory leak
Instead of freeing outBuffer, inBuffer gets freed twice.
Signed-off-by: Nicolas Kaiser <nikai@...ai.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists