[pulseaudio-discuss] [PATCH] pulse: Fix old bug in stream_free

Maarten Lankhorst m.b.lankhorst at gmail.com
Tue Feb 14 17:09:02 PST 2012


Signed-off-by: Maarten Lankhorst<m.b.lankhorst at gmail.com>

---
Derp, should be backported to stable distro versions too, found out after testing my winepulse
with wine's mmdevapi tests.

diff --git a/src/pulse/stream.c b/src/pulse/stream.c
index 0a96ced..6115cef 100644
--- a/src/pulse/stream.c
+++ b/src/pulse/stream.c
@@ -284,8 +284,9 @@ static void stream_free(pa_stream *s) {
      stream_unlink(s);

      if (s->write_memblock) {
-        pa_memblock_release(s->write_memblock);
-        pa_memblock_unref(s->write_data);
+        if (s->write_data)
+            pa_memblock_release(s->write_memblock);
+        pa_memblock_unref(s->write_memblock);
      }

      if (s->peek_memchunk.memblock) {




More information about the pulseaudio-discuss mailing list