[svn-commits] kmoore: linux/trunk r9449 - /linux/trunk/drivers/dahdi/dahdi-base.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Oct 20 11:20:32 CDT 2010


Author: kmoore
Date: Wed Oct 20 11:20:30 2010
New Revision: 9449

URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=9449
Log:
dahdi-base: Fixed null pointer dereference in dahdi_check_conf

Fixes regression from rev 9366

Modified:
    linux/trunk/drivers/dahdi/dahdi-base.c

Modified: linux/trunk/drivers/dahdi/dahdi-base.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/dahdi-base.c?view=diff&rev=9449&r1=9448&r2=9449
==============================================================================
--- linux/trunk/drivers/dahdi/dahdi-base.c (original)
+++ linux/trunk/drivers/dahdi/dahdi-base.c Wed Oct 20 11:20:30 2010
@@ -951,8 +951,11 @@
 
 	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 ||




More information about the svn-commits mailing list