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:
parent
816d9ab2e7
commit
e60640878f
|
@ -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) {
|
||||
|
|
Reference in New Issue