mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-04 03:50:31 +00:00
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:
@@ -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));
|
||||
|
Reference in New Issue
Block a user