Index: formats/format_wav_gsm.c =================================================================== RCS file: /usr/cvsroot/asterisk/formats/format_wav_gsm.c,v retrieving revision 1.22 diff -u -r1.22 format_wav_gsm.c --- formats/format_wav_gsm.c 4 Aug 2004 00:42:49 -0000 1.22 +++ formats/format_wav_gsm.c 27 Aug 2004 02:42:49 -0000 @@ -390,6 +390,11 @@ static void wav_close(struct ast_filestream *s) { char zero = 0; + if (ast_mutex_lock(&wav_lock)) { + ast_log(LOG_WARNING, "Unable to lock wav list\n"); + return; + } + glistcnt--; ast_mutex_unlock(&wav_lock); ast_update_use_count(); /* Pad to even length */