Commit 8745b320 authored by Dave Jones's avatar Dave Jones Committed by Linus Torvalds

[PATCH] fix leak in btaudio

parent 6f737f5f
......@@ -177,8 +177,11 @@ static int alloc_buffer(struct btaudio *bta)
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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment