dahdi-base: Fixed null pointer dereference in dahdi_check_conf

Fixes regression from rev 9366


git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9449 a0bf4364-ded3-4de4-8d8a-66a801d63aff
This commit is contained in:
Kinsey Moore 2010-10-20 16:20:30 +00:00
parent 92e2a646eb
commit 27899f256c

View File

@ -951,8 +951,11 @@ static void dahdi_check_conf(int x)
for (y = 0; y < maxchans; y++) {
struct dahdi_chan *const chan = chan_from_num(y);
const int confmode = chan->confmode & DAHDI_CONF_MODE_MASK;
if (chan && (chan->confna == x) &&
int confmode;
if (!chan)
continue;
confmode = chan->confmode & DAHDI_CONF_MODE_MASK;
if ((chan->confna == x) &&
(confmode == DAHDI_CONF_CONF ||
confmode == DAHDI_CONF_CONFANN ||
confmode == DAHDI_CONF_CONFMON ||