aboutsummaryrefslogtreecommitdiffstats
path: root/res/res_musiconhold.c
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-11-28 23:03:09 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-11-28 23:03:09 +0000
commit9cebea59f4724d59c065da97ccdbe13db29b543a (patch)
tree45675bde86284c0192ec926cf064bfae5663596f /res/res_musiconhold.c
parent92cd657a6d42c516e8e8f169209ddd0f57d4508d (diff)
Merged revisions 90101 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r90101 | file | 2007-11-28 18:59:28 -0400 (Wed, 28 Nov 2007) | 6 lines Fix a few memory leaks. (closes issue #11405) Reported by: eliel Patches: load_realtime.patch uploaded by eliel (license 64) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@90102 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res/res_musiconhold.c')
-rw-r--r--res/res_musiconhold.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/res/res_musiconhold.c b/res/res_musiconhold.c
index 027aed023..985dc80b3 100644
--- a/res/res_musiconhold.c
+++ b/res/res_musiconhold.c
@@ -1108,6 +1108,7 @@ static int local_ast_moh_start(struct ast_channel *chan, const char *mclass, con
}
}
}
+ ast_variables_destroy(var);
if (ast_strlen_zero(mohclass->dir)) {
if (!strcasecmp(mohclass->mode, "custom")) {
strcpy(mohclass->dir, "nodir");
@@ -1206,7 +1207,8 @@ static int local_ast_moh_start(struct ast_channel *chan, const char *mclass, con
}
- }
+ } else if (var)
+ ast_variables_destroy(var);
}