summaryrefslogtreecommitdiff
path: root/zaptel.c
diff options
context:
space:
mode:
authormarkster <markster@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2004-05-09 17:49:49 +0000
committermarkster <markster@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2004-05-09 17:49:49 +0000
commit5ce9eb4d5aee19a0b3be3be5cc339debfde4546d (patch)
tree0f377975ce921fee85675e6830b6012ec6eb841d /zaptel.c
parenta551431fb8612f85b2364c575aa60c06dba216a8 (diff)
Prevent possible double free
git-svn-id: http://svn.digium.com/svn/zaptel/trunk@388 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'zaptel.c')
-rwxr-xr-xzaptel.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/zaptel.c b/zaptel.c
index c03c33d..8789a11 100755
--- a/zaptel.c
+++ b/zaptel.c
@@ -702,7 +702,7 @@ static int zt_reallocbufs(struct zt_chan *ss, int j, int numbufs)
spin_lock_irqsave(&ss->lock, flags);
ss->blocksize = j; /* set the blocksize */
oldbuf = ss->readbuf[0]; /* Keep track of the old buffer */
-
+ ss->readbuf[0] = NULL;
if (newbuf) {
for (x=0;x<numbufs;x++) {
ss->readbuf[x] = newbuf + x * j;