aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-07-13 20:36:16 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-07-13 20:36:16 +0000
commit3546f3e5082e8a2cb373e17c71ccceed48906c74 (patch)
treebc8a5b12d27490279c8d26b660ae9eaefb8ebecb
parentecfcfdf8ae6c0c806647c639f57744717d7b18e4 (diff)
Merged revisions 75107 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r75107 | russell | 2007-07-13 15:35:22 -0500 (Fri, 13 Jul 2007) | 3 lines Fix a couple potential minor memory leaks. load_moh_classes() could return without destroying the loaded configuration. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@75108 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--res/res_musiconhold.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/res/res_musiconhold.c b/res/res_musiconhold.c
index 922701678..86b25a182 100644
--- a/res/res_musiconhold.c
+++ b/res/res_musiconhold.c
@@ -1065,7 +1065,7 @@ static int load_moh_classes(int reload)
*args++ = '\0';
if (!(get_mohbyname(var->name, 0))) {
if (!(class = moh_class_malloc())) {
- return numclasses;
+ break;
}
ast_copy_string(class->name, var->name, sizeof(class->name));
@@ -1091,7 +1091,7 @@ static int load_moh_classes(int reload)
if (args)
*args++ = '\0';
if (!(class = moh_class_malloc())) {
- return numclasses;
+ break;
}
ast_copy_string(class->name, var->name, sizeof(class->name));