[Asterisk-cvs] asterisk indications.c,1.7,1.7.2.1 pbx.c,1.96,1.96.2.1

markster at lists.digium.com markster at lists.digium.com
Tue Feb 10 21:45:33 CST 2004


Update of /usr/cvsroot/asterisk
In directory mongoose.digium.com:/tmp/cvs-serv17892

Modified Files:
      Tag: v1-0_stable
	indications.c pbx.c 
Log Message:
Fix several memory leaks


Index: indications.c
===================================================================
RCS file: /usr/cvsroot/asterisk/indications.c,v
retrieving revision 1.7
retrieving revision 1.7.2.1
diff -u -d -r1.7 -r1.7.2.1
--- indications.c	28 Jan 2004 21:32:48 -0000	1.7
+++ indications.c	11 Feb 2004 03:54:20 -0000	1.7.2.1
@@ -318,6 +318,7 @@
 		struct tone_zone_sound *tmp = zone->tones->next;
 		free((void*)zone->tones->name);
 		free((void*)zone->tones->data);
+		free((void*)zone->ringcadance);
 		free(zone->tones);
 		zone->tones = tmp;
 	}
@@ -395,6 +396,8 @@
 			if (option_verbose > 2)
 				ast_verbose(VERBOSE_PREFIX_3 "Unregistered indication country '%s'\n",tz->country);
 			free_zone(tz);
+			if (tone_zones == tz)
+				tone_zones = tmp;
 			tz = tmp;
 			res = 0;
 		}

Index: pbx.c
===================================================================
RCS file: /usr/cvsroot/asterisk/pbx.c,v
retrieving revision 1.96
retrieving revision 1.96.2.1
diff -u -d -r1.96 -r1.96.2.1
--- pbx.c	2 Feb 2004 01:13:00 -0000	1.96
+++ pbx.c	11 Feb 2004 03:54:20 -0000	1.96.2.1
@@ -4066,6 +4066,7 @@
 	struct ast_include *tmpi, *tmpil= NULL;
 	struct ast_sw *sw, *swl= NULL;
 	struct ast_exten *e, *el, *en;
+	struct ast_ignorepat *ipi, *ipl = NULL;
 	if (lock)
 		ast_mutex_lock(&conlock);
 	tmp = contexts;
@@ -4090,7 +4091,12 @@
 				tmpil = tmpi;
 				tmpi = tmpi->next;
 				free(tmpil);
-				tmpil = tmpi;
+			}
+			for (ipi = tmp->ignorepats; ipi; ) {
+				/* Free includes */
+				ipl = ipi;
+				ipi = ipi->next;
+				free(ipl);
 			}
 			for (sw = tmp->alts; sw; ) {
 				swl = sw;




More information about the svn-commits mailing list