mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-03 03:02:15 +00:00
Add missing checks during startup.
This ensures startup is canceled due to allocation failures from the following initializations. * channel.c: ast_channels_init * config_options.c: aco_init ASTERISK-26265 #close Change-Id: I911ed08fa2a3be35de55903e0225957bcdbe9611
This commit is contained in:
@@ -4504,7 +4504,10 @@ static void asterisk_daemon(int isroot, const char *runuser, const char *rungrou
|
||||
exit(1);
|
||||
}
|
||||
|
||||
aco_init();
|
||||
if (aco_init()) {
|
||||
printf("Failed: aco_init\n%s", term_quit());
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (ast_bucket_init()) {
|
||||
printf("Failed: ast_bucket_init\n%s", term_quit());
|
||||
@@ -4598,7 +4601,10 @@ static void asterisk_daemon(int isroot, const char *runuser, const char *rungrou
|
||||
exit(1);
|
||||
}
|
||||
|
||||
ast_channels_init();
|
||||
if (ast_channels_init()) {
|
||||
printf("Failed: ast_channels_init\n%s", term_quit());
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (ast_endpoint_init()) {
|
||||
printf ("Failed: ast_endpoint_init\n%s", term_quit());
|
||||
|
Reference in New Issue
Block a user