diff options
author | Kevin P. Fleming <kpfleming@digium.com> | 2008-07-07 20:30:22 +0000 |
---|---|---|
committer | Kevin P. Fleming <kpfleming@digium.com> | 2008-07-07 20:30:22 +0000 |
commit | 824b343ee65da92a45949d50dd3eccdc969fee1c (patch) | |
tree | 8daa87bc3f3246eefe4072c7fca94190d2b12175 /drivers/dahdi | |
parent | f6fdb13b10ee763d7f6a9877f106c8fea7958332 (diff) |
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
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@4563 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'drivers/dahdi')
-rw-r--r-- | drivers/dahdi/wctdm24xxp/base.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/dahdi/wctdm24xxp/base.c b/drivers/dahdi/wctdm24xxp/base.c index bb229e2..0696714 100644 --- a/drivers/dahdi/wctdm24xxp/base.c +++ b/drivers/dahdi/wctdm24xxp/base.c @@ -3749,7 +3749,7 @@ static void free_wc(struct wctdm *wc) { 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]); } |