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: https://origsvn.digium.com/svn/asterisk/branches/1.4@75108 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Russell Bryant
2007-07-13 20:36:16 +00:00
parent 90da4da6ad
commit aa44ffb5c3

View File

@@ -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));