diff --git a/main/utils.c b/main/utils.c index 3f21eb341d3c37a1b2698f4a08b04f9ad6fa227d..0ff33cba2793c171f0127d2c2da0bbf90957f367 100644 --- a/main/utils.c +++ b/main/utils.c @@ -795,6 +795,8 @@ static void append_backtrace_information(struct ast_str **str, struct ast_bt *bt return; } + /* store frame count locally to avoid the memory corruption that + * sometimes happens on virtualized CentOS 6.x systems */ num_frames = bt->num_frames; if ((symbols = ast_bt_get_symbols(bt->addresses, num_frames))) { int frame_iterator;