[asterisk-commits] russell: trunk r317428 - in /trunk: ./ apps/app_rpt.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu May 5 17:02:36 CDT 2011


Author: russell
Date: Thu May  5 17:02:31 2011
New Revision: 317428

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=317428
Log:
Merged revisions 317427 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r317427 | russell | 2011-05-05 16:58:45 -0500 (Thu, 05 May 2011) | 7 lines
  
  Fix potential memory leak, and use of uninitialized memory.
  
  (closes issue #16476)
  Reported by: junky
  Patches:
        M16476.diff uploaded by junky (license 177)
........

Modified:
    trunk/   (props changed)
    trunk/apps/app_rpt.c

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

Modified: trunk/apps/app_rpt.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/app_rpt.c?view=diff&rev=317428&r1=317427&r2=317428
==============================================================================
--- trunk/apps/app_rpt.c (original)
+++ trunk/apps/app_rpt.c Thu May  5 17:02:31 2011
@@ -1975,7 +1975,11 @@
 		return;
 	}
 	n = finddelim(astr,astrs,100);
-	if (n < 1) return;
+	if (n < 1) {
+		ast_free(str);
+		ast_free(astr);
+		return;
+	}
 	ast_mutex_lock(&myrpt->statpost_lock);
 	seq = ++myrpt->statpost_seqno;
 	ast_mutex_unlock(&myrpt->statpost_lock);
@@ -12218,7 +12222,7 @@
 						// ctcss code autopatch initiate
 						if (strstr((char *)f->data.ptr,"/M/")&& !myrpt->macropatch)
 						{
-						    char value[16];
+							char value[16] = "";
 							strcat(value,"*6");
 							myrpt->macropatch=1;
 							rpt_mutex_lock(&myrpt->lock);




More information about the asterisk-commits mailing list