mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-20 00:30:20 +00:00
Merge "res_pjsip: alloca can never fail."
This commit is contained in:
@@ -1708,9 +1708,7 @@ static int cli_endpoint_print_body(void *obj, void *arg, int flags)
|
||||
|
||||
if (number) {
|
||||
print_name_len = strlen(id) + strlen(number) + 2;
|
||||
if (!(print_name = alloca(print_name_len))) {
|
||||
return -1;
|
||||
}
|
||||
print_name = ast_alloca(print_name_len);
|
||||
snprintf(print_name, print_name_len, "%s/%s", id, number);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user