From: Pierre d'Herbemont Date: Sat, 6 Jun 2009 02:43:43 +0000 (-0700) Subject: libvlc: ref_count should only be accessed in the lock. X-Git-Tag: 1.1.0-ff~5521 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=df6cae660efdd762466d93366e080f0efaa58325;p=vlc libvlc: ref_count should only be accessed in the lock. --- diff --git a/src/control/core.c b/src/control/core.c index a083f5b583..ececd0ea0c 100644 --- a/src/control/core.c +++ b/src/control/core.c @@ -165,9 +165,8 @@ void libvlc_release( libvlc_instance_t *p_instance ) vlc_mutex_t *lock = &p_instance->instance_lock; int refs; - assert( p_instance->ref_count > 0 ); - vlc_mutex_lock( lock ); + assert( p_instance->ref_count > 0 ); refs = --p_instance->ref_count; vlc_mutex_unlock( lock );