diff options
author | Corey Farrell <git@cfware.com> | 2017-10-13 09:51:09 -0400 |
---|---|---|
committer | Corey Farrell <git@cfware.com> | 2017-10-13 10:32:48 -0500 |
commit | 09301ddc4f134a7e1d3efde38eb41d3a2136508d (patch) | |
tree | b92e47199aaae9344022a1a2ba99edebb3eb746d /main/backtrace.c | |
parent | 9f9371952cdf5602ddb89b734337c42571e613ad (diff) |
ast_bt_get_symbols: Prevent double-free.
It's possible for bfdobj to be created but syms not created. If syms
was not allocated in the current loop iteration but was allocated in the
previous iteration it would crash.
ASTERISK-27340
Change-Id: I5b110c609f6dfe91339f782a99a431bca5837363
Diffstat (limited to 'main/backtrace.c')
-rw-r--r-- | main/backtrace.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/main/backtrace.c b/main/backtrace.c index 0b29385fd..aed4ffd94 100644 --- a/main/backtrace.c +++ b/main/backtrace.c @@ -172,6 +172,7 @@ char **__ast_bt_get_symbols(void **addresses, size_t num_frames) if (bfdobj) { bfd_close(bfdobj); ast_std_free(syms); + syms = NULL; } /* Default output, if we cannot find the information within BFD */ |