summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/modules/bluetooth/module-bluez5-device.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/modules/bluetooth/module-bluez5-device.c b/src/modules/bluetooth/module-bluez5-device.c
index 767482e4a..9c40a60ff 100644
--- a/src/modules/bluetooth/module-bluez5-device.c
+++ b/src/modules/bluetooth/module-bluez5-device.c
@@ -392,6 +392,8 @@ static int bt_process_render(struct userdata *u) {
if (processed != u->write_memchunk.length) {
pa_log_error("Encoding error");
+ pa_memblock_unref(u->write_memchunk.memblock);
+ pa_memchunk_reset(&u->write_memchunk);
return -1;
}
@@ -535,6 +537,7 @@ static int bt_process_push(struct userdata *u) {
if (processed != (size_t) received) {
pa_log_error("Decoding error");
+ pa_memblock_unref(memchunk.memblock);
return -1;
}