From: Ian Abbott Date: Mon, 15 Nov 2010 10:25:43 +0000 (+0000) Subject: Fix memory leak spotted by Nicolas Kaiser in the staging sources. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=a87727885c4bb1290bf530da29f3bcc7a7247d3a;p=comedi.git Fix memory leak spotted by Nicolas Kaiser in the staging sources. --- diff --git a/comedi/drivers/usbdux.c b/comedi/drivers/usbdux.c index c547a571..8d99c47e 100644 --- a/comedi/drivers/usbdux.c +++ b/comedi/drivers/usbdux.c @@ -2294,9 +2294,9 @@ static void tidy_up(usbduxsub_t * usbduxsub_tmp) kfree(usbduxsub_tmp->insnBuffer); usbduxsub_tmp->insnBuffer = NULL; } - if (usbduxsub_tmp->inBuffer) { - kfree(usbduxsub_tmp->inBuffer); - usbduxsub_tmp->inBuffer = NULL; + if (usbduxsub_tmp->outBuffer) { + kfree(usbduxsub_tmp->outBuffer); + usbduxsub_tmp->outBuffer = NULL; } if (usbduxsub_tmp->dac_commands) { kfree(usbduxsub_tmp->dac_commands);