JeffersonLab / JANA2

Multi-threaded HENP Event Reconstruction
https://jeffersonlab.github.io/JANA2/
Other
6 stars 9 forks source link

JBacktrace.h: free after use #224

Closed wdconinc closed 1 year ago

wdconinc commented 1 year ago

"The return value of backtrace_symbols is a pointer obtained via the malloc function, and it is the responsibility of the caller to free that pointer. Note that only the return value need be freed, not the individual strings." (https://www.gnu.org/software/libc/manual/html_node/Backtraces.html and example therein)

Fix is untested (I'm in a container and can't easily rebuild jana2 at the moment).