From 8a4e4ea5524640be09cc4db2d765b59f50e07387 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Thu, 25 Jan 2018 07:38:52 -0800 Subject: [PATCH] * pecoff.c (coff_add): Only release syms_view if it is valid. --- pecoff.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pecoff.c b/pecoff.c index 0158877..85737d6 100644 --- a/pecoff.c +++ b/pecoff.c @@ -804,8 +804,11 @@ coff_add (struct backtrace_state *state, int descriptor, backtrace_release_view (state, §s_view, error_callback, data); sects_view_valid = 0; - backtrace_release_view (state, &syms_view, error_callback, data); - syms_view_valid = 0; + if (syms_view_valid) + { + backtrace_release_view (state, &syms_view, error_callback, data); + syms_view_valid = 0; + } /* Read all the debug sections in a single view, since they are probably adjacent in the file. We never release this view. */