[pulseaudio-commits] r1711 - /branches/lennart/src/pulsecore/memblock.c

svnmailer-noreply at 0pointer.de svnmailer-noreply at 0pointer.de
Thu Aug 23 15:34:50 PDT 2007


Author: lennart
Date: Fri Aug 24 00:34:49 2007
New Revision: 1711

URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=3D1711&root=3Dpulseaudio&vi=
ew=3Drev
Log:
fix a bad memory access when destructing pa_memimports

Modified:
    branches/lennart/src/pulsecore/memblock.c

Modified: branches/lennart/src/pulsecore/memblock.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/lennart/src/pulsecore/=
memblock.c?rev=3D1711&root=3Dpulseaudio&r1=3D1710&r2=3D1711&view=3Ddiff
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- branches/lennart/src/pulsecore/memblock.c (original)
+++ branches/lennart/src/pulsecore/memblock.c Fri Aug 24 00:34:49 2007
@@ -608,10 +608,11 @@
 =

     memblock_make_local(b);
 =

-    if (-- seg->n_blocks <=3D 0)
+    if (-- seg->n_blocks <=3D 0) {
+        pa_mutex_unlock(seg->import->mutex);
         segment_detach(seg);
-
-    pa_mutex_unlock(seg->import->mutex);
+    } else =

+        pa_mutex_unlock(seg->import->mutex);
 }
 =

 pa_mempool* pa_mempool_new(int shared) {




More information about the pulseaudio-commits mailing list