lkml.org 
[lkml]   [2003]   [Sep]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] fix leak in btaudio
Date
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/
\
 
 \ /
  Last update: 2005-03-22 13:48    [W:0.289 / U:0.160 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site