[svn-commits] trunk r32596 - in /trunk: ./ callerid.c

svn-commits at lists.digium.com svn-commits at lists.digium.com
Tue Jun 6 09:05:29 MST 2006


Author: tilghman
Date: Tue Jun  6 11:05:29 2006
New Revision: 32596

URL: http://svn.digium.com/view/asterisk?rev=32596&view=rev
Log:
Merged revisions 32582 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r32582 | tilghman | 2006-06-06 11:02:43 -0500 (Tue, 06 Jun 2006) | 2 lines

Bug 7268 - Callerid leaks memory on error

........

Modified:
    trunk/   (props changed)
    trunk/callerid.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.2-merged' - no diff available.

Modified: trunk/callerid.c
URL: http://svn.digium.com/view/asterisk/trunk/callerid.c?rev=32596&r1=32595&r2=32596&view=diff
==============================================================================
--- trunk/callerid.c (original)
+++ trunk/callerid.c Tue Jun  6 11:05:29 2006
@@ -557,6 +557,7 @@
 		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);
@@ -590,6 +591,7 @@
 			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;
@@ -675,6 +677,7 @@
 					strcpy(cid->name, "");
 					cid->flags |= CID_UNKNOWN_NAME;
 				}
+				free(obuf);
 				return 1;
 				break;
 			default:



More information about the svn-commits mailing list