summaryrefslogtreecommitdiff
path: root/res/res_musiconhold.c
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2007-11-28 23:03:09 +0000
committerJoshua Colp <jcolp@digium.com>2007-11-28 23:03:09 +0000
commit48da9102252c3271ac6e20018603f19dbba959de (patch)
tree45675bde86284c0192ec926cf064bfae5663596f /res/res_musiconhold.c
parent57c2bcca86384e9cb7bb3093fa2ac0f1c7ae483a (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: https://origsvn.digium.com/svn/asterisk/trunk@90102 65c4cc65-6c06-0410-ace0-fbb531ad65f3
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);
}