diff options
author | mogorman <mogorman@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2006-12-19 22:23:02 +0000 |
---|---|---|
committer | mogorman <mogorman@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2006-12-19 22:23:02 +0000 |
commit | e2cd32b13fe66f88eb7d9adc79d1c1f111b4ffa4 (patch) | |
tree | 2c2d7e7b375535b02e1a3ef6e3d4485a99f479e8 /zttranscode.c | |
parent | e8aa17a95d28fd79c315cbda3644afd471d83ad4 (diff) |
only clear pages that have been used, the real cause for problems.
git-svn-id: http://svn.digium.com/svn/zaptel/trunk@1744 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'zttranscode.c')
-rw-r--r-- | zttranscode.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/zttranscode.c b/zttranscode.c index 896f380..862c503 100644 --- a/zttranscode.c +++ b/zttranscode.c @@ -207,14 +207,16 @@ static void ztc_release(struct zt_transcoder_channel *ztc) if (!ztc) return; - for (page = virt_to_page(zth); - page < virt_to_page((unsigned long) zth + sizeof(*zth)); - page++) - ClearPageReserved(page); - ztc->flags &= ~(ZT_TC_FLAG_BUSY); - if (ztc->tch) + + if (ztc->tch) { + for (page = virt_to_page(zth); + page < virt_to_page((unsigned long) zth + sizeof(*zth)); + page++) + ClearPageReserved(page); kfree(ztc->tch); + } + ztc->tch = NULL; /* Actually reset the transcoder channel */ if (ztc->flags & ZT_TC_FLAG_TRANSIENT) |