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.2@75107 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Russell Bryant
2007-07-13 20:35:22 +00:00
parent a8d3745147
commit 8e7cb1aa7a

View File

@@ -1052,7 +1052,7 @@ static int load_moh_classes(int reload)
class = moh_class_malloc();
if (!class) {
ast_log(LOG_WARNING, "Out of memory!\n");
return numclasses;
break;
}
ast_copy_string(class->name, var->name, sizeof(class->name));
@@ -1080,7 +1080,7 @@ static int load_moh_classes(int reload)
class = moh_class_malloc();
if (!class) {
ast_log(LOG_WARNING, "Out of memory!\n");
return numclasses;
break;
}
ast_copy_string(class->name, var->name, sizeof(class->name));