[dahdi-commits] kpfleming: linux/trunk r4563 - /linux/trunk/drivers/dahdi/wctdm24xxp/base.c

SVN commits to the DAHDI project dahdi-commits at lists.digium.com
Mon Jul 7 15:30:22 CDT 2008


Author: kpfleming
Date: Mon Jul  7 15:30:22 2008
New Revision: 4563

URL: http://svn.digium.com/view/dahdi?view=rev&rev=4563
Log:
the initialization of wc->chans was done using NUM_CARDS in wc->cards, but then later wc->cards was (possibly) reduced to the actual number of cards present, so we have to check every possible slot in wc->chans for structures to free

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

Modified: linux/trunk/drivers/dahdi/wctdm24xxp/base.c
URL: http://svn.digium.com/view/dahdi/linux/trunk/drivers/dahdi/wctdm24xxp/base.c?view=diff&rev=4563&r1=4562&r2=4563
==============================================================================
--- linux/trunk/drivers/dahdi/wctdm24xxp/base.c (original)
+++ linux/trunk/drivers/dahdi/wctdm24xxp/base.c Mon Jul  7 15:30:22 2008
@@ -3749,7 +3749,7 @@
 {
 	unsigned int x;
 
-	for (x = 0; x < wc->cards; x++) {
+	for (x = 0; x < sizeof(wc->chans)/sizeof(wc->chans[0]); x++) {
 		if (wc->chans[x]) {
 			kfree(wc->chans[x]);
 		}




More information about the dahdi-commits mailing list