I believe you can deallocate it again with backtrace_free().  That said, there's nothing wrong with your approach, gccgo's runtime does the same thing.