]> code.delx.au - pulseaudio/commitdiff
pulse: Fix old bug in stream_free
authorMaarten Lankhorst <m.b.lankhorst@gmail.com>
Wed, 15 Feb 2012 01:09:02 +0000 (02:09 +0100)
committerTanu Kaskinen <tanuk@iki.fi>
Sun, 19 Feb 2012 17:02:08 +0000 (19:02 +0200)
Signed-off-by: Maarten Lankhorst<m.b.lankhorst@gmail.com>
src/pulse/stream.c

index 0a96ced0f4e2dde6677e1ea3b781b5de12244c53..6115cefb335757d3d18d57344513a55f9e814d06 100644 (file)
@@ -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) {