Fix memory leak spotted by Nicolas Kaiser in the staging sources.
authorIan Abbott <abbotti@mev.co.uk>
Mon, 15 Nov 2010 10:25:43 +0000 (10:25 +0000)
committerIan Abbott <abbotti@mev.co.uk>
Mon, 15 Nov 2010 10:25:43 +0000 (10:25 +0000)
comedi/drivers/usbdux.c

index c547a571ab6cb2363d2bf68cab7a3ae7bc921eb6..8d99c47e7a8f37f7fc03261de1cecc1d5de9c016 100644 (file)
@@ -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);