[pulseaudio-commits] src/pulsecore
David Henningsson
diwic at kemper.freedesktop.org
Wed Dec 10 05:30:15 PST 2014
src/pulsecore/memblock.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
New commits:
commit 9e65fd137364d67f06168a260f7ab192536c85f5
Author: David Henningsson <david.henningsson at canonical.com>
Date: Tue Dec 9 22:58:36 2014 +0100
memblock: Initialize mempool object to zero
This fixes a "use of uninitialised value" error in previous memblock commit.
Reported-by: Alexander Patrakov <patrakov at gmail.com>
Signed-off-by: David Henningsson <david.henningsson at canonical.com>
diff --git a/src/pulsecore/memblock.c b/src/pulsecore/memblock.c
index eb85d1f..b781312 100644
--- a/src/pulsecore/memblock.c
+++ b/src/pulsecore/memblock.c
@@ -751,7 +751,7 @@ pa_mempool* pa_mempool_new(bool shared, size_t size) {
pa_mempool *p;
char t1[PA_BYTES_SNPRINT_MAX], t2[PA_BYTES_SNPRINT_MAX];
- p = pa_xnew(pa_mempool, 1);
+ p = pa_xnew0(pa_mempool, 1);
p->block_size = PA_PAGE_ALIGN(PA_MEMPOOL_SLOT_SIZE);
if (p->block_size < PA_PAGE_SIZE)
@@ -778,7 +778,6 @@ pa_mempool* pa_mempool_new(bool shared, size_t size) {
pa_bytes_snprint(t2, sizeof(t2), (unsigned) (p->n_blocks * p->block_size)),
(unsigned long) pa_mempool_block_size_max(p));
- memset(&p->stat, 0, sizeof(p->stat));
pa_atomic_store(&p->n_init, 0);
PA_LLIST_HEAD_INIT(pa_memimport, p->imports);
More information about the pulseaudio-commits
mailing list