diff options
Diffstat (limited to 'binaryview.cpp')
| -rw-r--r-- | binaryview.cpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/binaryview.cpp b/binaryview.cpp index 5c0dd951..d1c44e97 100644 --- a/binaryview.cpp +++ b/binaryview.cpp @@ -409,7 +409,10 @@ BinaryView* TagType::GetView() const std::string TagType::GetName() const { - return BNTagTypeGetName(m_object); + char* str = BNTagTypeGetName(m_object); + string result = str; + BNFreeString(str); + return result; } @@ -725,13 +728,19 @@ Section::Section(BNSection* sec) std::string Section::GetName() const { - return BNSectionGetName(m_object); + char* str = BNSectionGetName(m_object); + string result = str; + BNFreeString(str); + return result; } std::string Section::GetType() const { - return BNSectionGetType(m_object); + char* str = BNSectionGetType(m_object); + string result = str; + BNFreeString(str); + return result; } |
