fix memory leak (#4126)

This commit is contained in:
Yonggang Li
2017-01-03 13:54:15 -08:00
committed by Wouter van Oortmerssen
parent 69dc71b5ed
commit fea6b525ee

View File

@@ -1836,6 +1836,7 @@ CheckedError Parser::DoParse(const char *source, const char **include_paths,
source_ = cursor_ = source;
line_ = 1;
error_.clear();
field_stack_.clear();
builder_.Clear();
// Start with a blank namespace just in case this file doesn't have one.
namespaces_.push_back(new Namespace());