diff options
Diffstat (limited to 'binaryview.cpp')
| -rw-r--r-- | binaryview.cpp | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/binaryview.cpp b/binaryview.cpp index 242b2a01..310396c0 100644 --- a/binaryview.cpp +++ b/binaryview.cpp @@ -939,7 +939,10 @@ void TagType::SetName(const std::string& name) std::string TagType::GetIcon() const { - return BNTagTypeGetIcon(m_object); + char* str = BNTagTypeGetIcon(m_object); + string result = str; + BNFreeString(str); + return result; } @@ -1002,7 +1005,10 @@ Ref<TagType> Tag::GetType() const std::string Tag::GetData() const { - return BNTagGetData(m_object); + char* str = BNTagGetData(m_object); + string result = str; + BNFreeString(str); + return result; } @@ -1278,13 +1284,19 @@ uint64_t Section::GetEntrySize() const std::string Section::GetLinkedSection() const { - return BNSectionGetLinkedSection(m_object); + char* str = BNSectionGetLinkedSection(m_object); + string result = str; + BNFreeString(str); + return result; } std::string Section::GetInfoSection() const { - return BNSectionGetInfoSection(m_object); + char* str = BNSectionGetInfoSection(m_object); + string result = str; + BNFreeString(str); + return result; } |
