staging: comedi: fix memory leak

Instead of freeing outBuffer, inBuffer gets freed twice.

Signed-off-by: Nicolas Kaiser <nikai@nikai.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Nicolas Kaiser 2010-11-13 19:46:50 +01:00 committed by Greg Kroah-Hartman
parent ebba26f4a8
commit 61838261ed

View File

@ -2295,8 +2295,8 @@ static void tidy_up(struct usbduxsub *usbduxsub_tmp)
usbduxsub_tmp->inBuffer = NULL; usbduxsub_tmp->inBuffer = NULL;
kfree(usbduxsub_tmp->insnBuffer); kfree(usbduxsub_tmp->insnBuffer);
usbduxsub_tmp->insnBuffer = NULL; usbduxsub_tmp->insnBuffer = NULL;
kfree(usbduxsub_tmp->inBuffer); kfree(usbduxsub_tmp->outBuffer);
usbduxsub_tmp->inBuffer = NULL; usbduxsub_tmp->outBuffer = NULL;
kfree(usbduxsub_tmp->dac_commands); kfree(usbduxsub_tmp->dac_commands);
usbduxsub_tmp->dac_commands = NULL; usbduxsub_tmp->dac_commands = NULL;
kfree(usbduxsub_tmp->dux_commands); kfree(usbduxsub_tmp->dux_commands);