- Backport upstream fixes: cleanups, non-glibc build fixes, fixes and enhancements of pcm_file plugin, etc. 0010-remove-unnecessary-obsolete-compat-hsearch_r.c.patch 0011-local.h-include-sys-types.h-to-fix-issues-with-pcm.h.patch 0012-test-chmap-Add-missing-usage-text-for-s-option.patch 0013-include-global.h-don-t-define-timeval-and-timespec-s.patch 0014-conf.c-use-portable-way-to-initialize-recursive-mute.patch 0015-pcm_file-fix-SEGFAULT-if-file-option-is-missing-whil.patch 0016-pcm_file-fixed-memory-leak.patch 0017-pcm_file-don-t-touch-infile-on-playback-and-output-f.patch 0018-pcm_file-document-new-argument-to-snd_pcm_file_open.patch - Fix aborting in races at closing dmix streams (bnc#852446): 0019-dmix-Don-t-use-assert-and-abort.patch - Don't include modprobe.d hack for 12.2 and older distros, which seem broken on them OBS-URL: https://build.opensuse.org/request/show/208679 OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/alsa?expand=0&rev=143
45 lines
1.4 KiB
Diff
45 lines
1.4 KiB
Diff
From e017c5f2df386c7c1f221a2f01c80edeec04b253 Mon Sep 17 00:00:00 2001
|
|
From: Andrey Mazo <mazo@telum.ru>
|
|
Date: Sun, 17 Nov 2013 01:11:55 +0400
|
|
Subject: [PATCH] pcm_file: fixed memory leak.
|
|
|
|
Valgrind report for this leak was:
|
|
|
|
Command: aplay -Dfile:'/tmp/qqq',raw qqq.wav
|
|
|
|
14 bytes in 1 blocks are definitely lost in loss record 1 of 2
|
|
at 0x402BF5C: malloc (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
|
|
by 0x40D7557: snd_pcm_file_hw_params (in /usr/lib/libasound.so.2.0.0)
|
|
by 0x40BA093: _snd_pcm_hw_params_internal (in /usr/lib/libasound.so.2.0.0)
|
|
by 0x40AB831: snd_pcm_hw_params (in /usr/lib/libasound.so.2.0.0)
|
|
by 0x804C523: ??? (in /usr/bin/aplay)
|
|
by 0x804E5B7: ??? (in /usr/bin/aplay)
|
|
by 0x804FC8C: ??? (in /usr/bin/aplay)
|
|
by 0x80520FB: ??? (in /usr/bin/aplay)
|
|
by 0x4184942: (below main) (libc-start.c:226)
|
|
|
|
Signed-off-by: Andrey Mazo <mazo@telum.ru>
|
|
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
---
|
|
src/pcm/pcm_file.c | 2 ++
|
|
1 file changed, 2 insertions(+)
|
|
|
|
diff --git a/src/pcm/pcm_file.c b/src/pcm/pcm_file.c
|
|
index 3d14090fd2ea..c3e67b2b2638 100644
|
|
--- a/src/pcm/pcm_file.c
|
|
+++ b/src/pcm/pcm_file.c
|
|
@@ -592,8 +592,10 @@ static int snd_pcm_file_hw_free(snd_pcm_t *pcm)
|
|
snd_pcm_file_t *file = pcm->private_data;
|
|
free(file->wbuf);
|
|
free(file->wbuf_areas);
|
|
+ free(file->final_fname);
|
|
file->wbuf = NULL;
|
|
file->wbuf_areas = NULL;
|
|
+ file->final_fname = NULL;
|
|
return snd_pcm_hw_free(file->gen.slave);
|
|
}
|
|
|
|
--
|
|
1.8.4.3
|
|
|