aboutsummaryrefslogtreecommitdiffstats
path: root/callerid.c
diff options
context:
space:
mode:
authorroot <root@f38db490-d61c-443f-a65b-d21fe96a405b>2006-06-06 16:05:13 +0000
committerroot <root@f38db490-d61c-443f-a65b-d21fe96a405b>2006-06-06 16:05:13 +0000
commita2042161df0c1fb6a5365117f6b26d8e5725cab3 (patch)
tree2eb711753d615915461d214c0a4b75e0e6b1c3a1 /callerid.c
parentde047182bd47cc1fe336066a4c8c20b4e02417a3 (diff)
automerge commit
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2-netsec@32595 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'callerid.c')
-rw-r--r--callerid.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/callerid.c b/callerid.c
index a0937b24a..f709bd501 100644
--- a/callerid.c
+++ b/callerid.c
@@ -274,6 +274,7 @@ int callerid_feed(struct callerid_state *cid, unsigned char *ubuf, int len, int
res = fsk_serie(&cid->fskd, buf, &mylen, &b);
if (mylen < 0) {
ast_log(LOG_ERROR, "fsk_serie made mylen < 0 (%d)\n", mylen);
+ free(obuf);
return -1;
}
buf += (olen - mylen);
@@ -307,6 +308,7 @@ int callerid_feed(struct callerid_state *cid, unsigned char *ubuf, int len, int
case 4: /* Retrieve message */
if (cid->pos >= 128) {
ast_log(LOG_WARNING, "Caller ID too long???\n");
+ free(obuf);
return -1;
}
cid->rawdata[cid->pos++] = b;
@@ -392,6 +394,7 @@ int callerid_feed(struct callerid_state *cid, unsigned char *ubuf, int len, int
strcpy(cid->name, "");
cid->flags |= CID_UNKNOWN_NAME;
}
+ free(obuf);
return 1;
break;
default: