Messages in this thread Patch in this message | | | From | davej@redhat ... | Subject | [PATCH] fix leak in btaudio | Date | Mon, 29 Sep 2003 18:04:34 +0100 |
| |
diff -urpN --exclude-from=/home/davej/.exclude bk-linus/sound/oss/btaudio.c linux-2.5/sound/oss/btaudio.c --- bk-linus/sound/oss/btaudio.c 2003-09-08 00:49:05.000000000 +0100 +++ linux-2.5/sound/oss/btaudio.c 2003-09-08 01:32:13.000000000 +0100 @@ -177,8 +177,11 @@ static int alloc_buffer(struct btaudio * bta->risc_size = PAGE_SIZE; bta->risc_cpu = pci_alloc_consistent (bta->pci, bta->risc_size, &bta->risc_dma); - if (NULL == bta->risc_cpu) + if (NULL == bta->risc_cpu) { + pci_free_consistent(bta->pci, bta->buf_size, bta->buf_cpu, bta->dma); + bta->buf_cpu = NULL; return -ENOMEM; + } } return 0; } - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |