mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
Merge "res_pjsip: alloca can never fail." into 13
This commit is contained in:
@@ -1711,9 +1711,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