mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-05 13:29:57 -05:00
Fix concurrency bug when turning memblock into a local memblock
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1514 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
481b425a28
commit
63c231ed36
1 changed files with 3 additions and 3 deletions
|
|
@ -567,10 +567,10 @@ void pa_memblock_unref_fixed(pa_memblock *b) {
|
|||
assert(PA_REFCNT_VALUE(b) > 0);
|
||||
assert(b->type == PA_MEMBLOCK_FIXED);
|
||||
|
||||
if (PA_REFCNT_DEC(b) > 0)
|
||||
if (PA_REFCNT_VALUE(b) > 1)
|
||||
memblock_make_local(b);
|
||||
else
|
||||
memblock_free(b);
|
||||
|
||||
pa_memblock_unref(b);
|
||||
}
|
||||
|
||||
/* Self-locked. This function is not multiple-caller safe */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue