dect
/
asterisk
Archived
13
0
Fork 0

Don't try to lock/unlock an uninitialized lock on a dahdi_pri.

This small changes prevents destroy_all_channels() from accessing a lock on an
unused dahdi_pri struct, resolving a ton of ERRORs that get spewed out when
shutting Asterisk down gracefully.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@272052 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
russell 2010-06-22 23:20:37 +00:00
parent 816d9ab2e7
commit e60640878f
1 changed files with 3 additions and 0 deletions

View File

@ -5484,6 +5484,9 @@ static void destroy_all_channels(void)
#if defined(HAVE_PRI)
/* Destroy all of the no B channel interface lists */
for (span = 0; span < NUM_SPANS; ++span) {
if (!pris[span].dchannels[0]) {
break;
}
pri = &pris[span].pri;
ast_mutex_lock(&pri->lock);
while (pri->no_b_chan_iflist) {