diff options
| author | Mark Rowe <mark@vector35.com> | 2026-05-11 18:49:26 -0700 |
|---|---|---|
| committer | Mark Rowe <mark@vector35.com> | 2026-05-19 10:36:46 -0700 |
| commit | fd40266f767e51e649fb48376e25f47a60d79765 (patch) | |
| tree | db351a36617200d4ad659bb3c1aa921b8d08f204 /typeparser.cpp | |
| parent | 297a98bff289ecde90d808f6538c2c5edf804af6 (diff) | |
Fix incorrect reference counting in C++ API
Diffstat (limited to 'typeparser.cpp')
| -rw-r--r-- | typeparser.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/typeparser.cpp b/typeparser.cpp index 8fe20a1f..18ecac08 100644 --- a/typeparser.cpp +++ b/typeparser.cpp @@ -97,7 +97,9 @@ std::string TypeParser::FormatParseErrors(const std::vector<TypeParserError>& er BNFreeString(apiError.fileName); } - return string; + std::string result = string ? string : ""; + BNFreeString(string); + return result; } |
