[PATCH] pulse: Fix old bug in stream_free

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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) {




[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux