projects
/
GitHub
/
LineageOS
/
android_kernel_samsung_universal7580.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ac190c7
)
ALSA: PCM: Fix possible memory leaks in the error path
author
Takashi Iwai
<tiwai@suse.de>
Fri, 3 Aug 2012 10:48:32 +0000
(12:48 +0200)
committer
Takashi Iwai
<tiwai@suse.de>
Fri, 3 Aug 2012 10:48:32 +0000
(12:48 +0200)
When the first page allocation failed for sgbuf, it leaks the records
that have been formerly allocated.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/core/sgbuf.c
patch
|
blob
|
blame
|
history
diff --git
a/sound/core/sgbuf.c
b/sound/core/sgbuf.c
index 4e7ec2b498738b6e2ebca47511be93b590af2aa8..d0f00356fc115a32db23bc8475f08a6aad178c47 100644
(file)
--- a/
sound/core/sgbuf.c
+++ b/
sound/core/sgbuf.c
@@
-101,7
+101,7
@@
void *snd_malloc_sgbuf_pages(struct device *device,
if (snd_dma_alloc_pages_fallback(SNDRV_DMA_TYPE_DEV, device,
chunk, &tmpb) < 0) {
if (!sgbuf->pages)
-
return NULL
;
+
goto _failed
;
if (!res_size)
goto _failed;
size = sgbuf->pages * PAGE_SIZE;