aboutsummaryrefslogtreecommitdiffstats
path: root/pbx.c
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-02-11 03:54:28 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-02-11 03:54:28 +0000
commit043834c47de63928d20517615afaa1c19af97d89 (patch)
treefea0781c0984e9c492dba5885d45940632011a70 /pbx.c
parent4ab36f26ab0a683cfb903721bcfe1981e8ec3a75 (diff)
Fix several memory leaks
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@2153 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'pbx.c')
-rwxr-xr-xpbx.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/pbx.c b/pbx.c
index 84f601644..27a9b1fe2 100755
--- a/pbx.c
+++ b/pbx.c
@@ -4066,6 +4066,7 @@ void __ast_context_destroy(struct ast_context *con, char *registrar, int lock)
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 @@ void __ast_context_destroy(struct ast_context *con, char *registrar, int lock)
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;