Skip to content
This repository was archived by the owner on Apr 2, 2024. It is now read-only.

Commit 8a4e4ea

Browse files
* pecoff.c (coff_add): Only release syms_view if it is valid.
1 parent 97dd0df commit 8a4e4ea

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

pecoff.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -804,8 +804,11 @@ coff_add (struct backtrace_state *state, int descriptor,
804804

805805
backtrace_release_view (state, &sects_view, error_callback, data);
806806
sects_view_valid = 0;
807-
backtrace_release_view (state, &syms_view, error_callback, data);
808-
syms_view_valid = 0;
807+
if (syms_view_valid)
808+
{
809+
backtrace_release_view (state, &syms_view, error_callback, data);
810+
syms_view_valid = 0;
811+
}
809812

810813
/* Read all the debug sections in a single view, since they are
811814
probably adjacent in the file. We never release this view. */

0 commit comments

Comments
 (0)