diff options
Diffstat (limited to 'res/res_pjsip')
-rw-r--r-- | res/res_pjsip/pjsip_cli.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/res/res_pjsip/pjsip_cli.c b/res/res_pjsip/pjsip_cli.c index 6abd62983..6ad820a0c 100644 --- a/res/res_pjsip/pjsip_cli.c +++ b/res/res_pjsip/pjsip_cli.c @@ -71,9 +71,8 @@ int ast_sip_cli_print_sorcery_objectset(void *obj, void *arg, int flags) } } - if (!(separator = alloca(max_name_width + max_value_width + 8))) { - return -1; - } + separator = ast_alloca(max_name_width + max_value_width + 8); + memset(separator, '=', max_name_width + max_value_width + 3); separator[max_name_width + max_value_width + 3] = 0; @@ -86,6 +85,8 @@ int ast_sip_cli_print_sorcery_objectset(void *obj, void *arg, int flags) ast_str_append(&context->output_buffer, 0, " %-*s : %s\n", max_name_width, i->name, i->value); } + ast_variables_destroy(objset); + return 0; } |