From: Mathieu Rene Date: Mon, 15 Feb 2010 20:34:11 +0000 (+0000) Subject: mod_voicemail: that shouldve been wrlock, and its missing an unlock X-Git-Tag: v1.0.6~477 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=94b1948a57814dc7d413b583c82145b2a2ef12e7;p=thirdparty%2Ffreeswitch.git mod_voicemail: that shouldve been wrlock, and its missing an unlock git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16647 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- diff --git a/src/mod/applications/mod_voicemail/mod_voicemail.c b/src/mod/applications/mod_voicemail/mod_voicemail.c index e46ca39a57..5fb68cdc54 100644 --- a/src/mod/applications/mod_voicemail/mod_voicemail.c +++ b/src/mod/applications/mod_voicemail/mod_voicemail.c @@ -738,7 +738,8 @@ static void profile_rwunlock(vm_profile_t *profile) { switch_thread_rwlock_unlock(profile->rwlock); if (switch_test_flag(profile, PFLAG_DESTROY)) { - if (switch_thread_rwlock_tryrdlock(profile->rwlock) == SWITCH_STATUS_SUCCESS) { + if (switch_thread_rwlock_trywrlock(profile->rwlock) == SWITCH_STATUS_SUCCESS) { + switch_thread_rwlock_unlock(profile->rwlock); free_profile(profile); } }