From 3c443b349d413e4093caf8af8c6e6f146fb427b0 Mon Sep 17 00:00:00 2001 From: Shaun Ruffell Date: Fri, 27 Apr 2012 20:12:09 +0000 Subject: Assign NULL values to pointers to insure that future kfree calls do not cause errors. From: Doug Bailey Signed-off-by: Shaun Ruffell Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10678 git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.6@10679 a0bf4364-ded3-4de4-8d8a-66a801d63aff --- drivers/dahdi/wct4xxp/base.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/dahdi/wct4xxp/base.c b/drivers/dahdi/wct4xxp/base.c index 9fdd330..8bdd2f0 100644 --- a/drivers/dahdi/wct4xxp/base.c +++ b/drivers/dahdi/wct4xxp/base.c @@ -2093,6 +2093,8 @@ static int t4_alloc_channels(struct t4 *wc, struct t4_span *ts, for (i = 0; i < ARRAY_SIZE(ts->chans); ++i) { kfree(ts->chans[i]); kfree(ts->ec[i]); + ts->chans[i] = NULL; + ts->ec[i] = NULL; } ts->linemode = linemode; -- cgit v1.2.3