aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/pcm_buffer.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/pcm_buffer.h b/src/pcm_buffer.h
index 31975d5b6..85e8728f8 100644
--- a/src/pcm_buffer.h
+++ b/src/pcm_buffer.h
@@ -65,7 +65,8 @@ pcm_buffer_get(struct pcm_buffer *buffer, size_t size)
g_free(buffer->buffer);
/* allocate a new buffer; align at 64kB boundaries */
- buffer->buffer = g_malloc((size | 0xffff) + 1);
+ buffer->size = (size | 0xffff) + 1;
+ buffer->buffer = g_malloc(buffer->size);
}
return buffer->buffer;