Fix memory leaks in GoParser
authorRaphael Isemann <teemperor@gmail.com>
Tue, 23 Jan 2018 13:50:46 +0000 (13:50 +0000)
committerRaphael Isemann <teemperor@gmail.com>
Tue, 23 Jan 2018 13:50:46 +0000 (13:50 +0000)
commitb90f81ed821a14ce9464c02d4ffa7e0a79a9b2b0
treef732e1e674b320618bbc9bc67e4bf55584a933db
parenta67b3663de05b21af4bcbf2ae46c7230e9892c90
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

llvm-svn: 323197
lldb/source/Plugins/ExpressionParser/Go/GoParser.cpp