Re: [PATCH] fix leak in btaudio

From: Sander van Malssen
Date: Wed Oct 01 2003 - 13:36:01 EST


On Monday, 29 September 2003 at 18:04:34 +0100, davej@xxxxxxxxxx wrote:

> + pci_free_consistent(bta->pci, bta->buf_size, bta->buf_cpu, bta->dma);


Surely bta->dma must be bta->buf_dma, like so:


--- linux-2.6/sound/oss/btaudio.c.~1~ 2003-09-30 14:11:13.000000000 +0200
+++ linux-2.6/sound/oss/btaudio.c 2003-10-01 20:28:47.000000000 +0200
@@ -178,7 +178,7 @@
bta->risc_cpu = pci_alloc_consistent
(bta->pci, bta->risc_size, &bta->risc_dma);
if (NULL == bta->risc_cpu) {
- pci_free_consistent(bta->pci, bta->buf_size, bta->buf_cpu, bta->dma);
+ pci_free_consistent(bta->pci, bta->buf_size, bta->buf_cpu, bta->buf_dma);
bta->buf_cpu = NULL;
return -ENOMEM;
}




Cheers,
Sander

--
Sander van Malssen -- svm@xxxxxxxxxx -- http://www.kozmix.org/
http://www.peteandtommysdayout.com/ -- http://www.1-2-5.net/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/