Fix memory leaks in GoParser

Summary: The GoParser is leaking memory in the tests due to not freeing allocated nodes when encountering some parsing errors. With this patch all GoParser tests are passing with enabled memory sanitizers/ubsan.

Reviewers: labath, davide

Reviewed By: labath

Subscribers: lldb-commits

Differential Revision: https://reviews.llvm.org/D42409

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@323197 91177308-0d34-0410-b5e6-96231b3b80d8
1 file changed