aboutsummaryrefslogtreecommitdiff
path: root/libctf/ctf-open.c
diff options
context:
space:
mode:
authorChristian Biesinger <cbiesinger@google.com>2020-01-07 19:10:40 -0600
committerChristian Biesinger <cbiesinger@google.com>2020-01-09 13:13:04 -0600
commit57d750026550cf3a589e3f28a0cdc303ba5ed039 (patch)
tree0f736a1162600cd6a325bde3cf012a7e0d865215 /libctf/ctf-open.c
parentffebb0bbde7deae978ab3e4d3d3d90acf52b7d69 (diff)
downloadgdb-57d750026550cf3a589e3f28a0cdc303ba5ed039.zip
gdb-57d750026550cf3a589e3f28a0cdc303ba5ed039.tar.gz
gdb-57d750026550cf3a589e3f28a0cdc303ba5ed039.tar.bz2
Fix memory leak of the demangled symbol name
compute_and_set_names would only free the name if we did not find the name in the hashtable, but it needs to always free it. Solve this by moving the smart pointer outside the if. Thanks to PhilippeW for finding this. gdb/ChangeLog: 2020-01-09 Christian Biesinger <cbiesinger@google.com> * symtab.c (general_symbol_info::compute_and_set_names): Move the unique_xmalloc_ptr outside the if to always free the demangled name. Change-Id: Id7c6b8408432183700ccb5ff634818d6c5a3ac95
Diffstat (limited to 'libctf/ctf-open.c')
0 files changed, 0 insertions, 0 deletions