From: davej@redhat.com
To: torvalds@osdl.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] fix leak in btaudio
Date: Mon, 29 Sep 2003 18:04:34 +0100 [thread overview]
Message-ID: <E1A41Rq-0000NM-00@hardwired> (raw)
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;
}
next reply other threads:[~2003-09-29 17:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-09-29 17:04 davej [this message]
2003-10-01 18:31 ` [PATCH] fix leak in btaudio Sander van Malssen
2003-10-01 18:35 ` Dave Jones
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E1A41Rq-0000NM-00@hardwired \
--to=davej@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox