diff options
| author | Mason Reed <mason@vector35.com> | 2025-06-13 02:36:35 -0400 |
|---|---|---|
| committer | Mason Reed <mason@vector35.com> | 2025-06-13 02:36:35 -0400 |
| commit | 0c34857925e6b0c220871f921f5cf4d59bbdb403 (patch) | |
| tree | 961df42cc54dbb3a2ebbcbf30abbdbf3930cb027 /typeparser.cpp | |
| parent | 5700131107640018205653472891110147818179 (diff) | |
Fix misc memory leaks in C++ API
Diffstat (limited to 'typeparser.cpp')
| -rw-r--r-- | typeparser.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/typeparser.cpp b/typeparser.cpp index c32bcec1..7cbd442b 100644 --- a/typeparser.cpp +++ b/typeparser.cpp @@ -101,7 +101,10 @@ std::string TypeParser::FormatParseErrors(const std::vector<TypeParserError>& er std::string TypeParser::GetName() const { - return BNGetTypeParserName(m_object); + char* str = BNGetTypeParserName(m_object); + std::string result = str; + BNFreeString(str); + return result; } |
