libbacktrace: don't free ELF strtab if error occurs after saving syminfo
authorIan Lance Taylor <iant@golang.org>
Wed, 19 Feb 2020 18:30:51 +0000 (10:30 -0800)
committerIan Lance Taylor <iant@golang.org>
Sat, 9 May 2020 23:12:48 +0000 (16:12 -0700)
* elf.c (elf_add): Don't free strtab if an error occurs after
recording symbol information.

libbacktrace/ChangeLog
libbacktrace/elf.c

index 6fa15fc4e96a8d90ce96a4de3e7c4ae2eb6ac847..13d907011d8e2c47c9e4108166c3f1e74d5c90ca 100644 (file)
@@ -1,3 +1,8 @@
+2020-05-09  Ian Lance Taylor  <iant@golang.org>
+
+       * elf.c (elf_add): Don't free strtab if an error occurs after
+       recording symbol information.
+
 2020-05-09  Ian Lance Taylor  <iant@golang.org>
 
        PR libbacktrace/88745
index eb481c588e7e8e35499c141fdbe20c15cdca520b..1216af86fd9c8c11bb751b558622fb6cbc911e38 100644 (file)
@@ -3011,6 +3011,7 @@ elf_add (struct backtrace_state *state, const char *filename, int descriptor,
         string table permanently.  */
       backtrace_release_view (state, &symtab_view, error_callback, data);
       symtab_view_valid = 0;
+      strtab_view_valid = 0;
 
       *found_sym = 1;