aboutsummaryrefslogtreecommitdiffstats
path: root/lib/siscomponentrecord.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/siscomponentrecord.cpp')
-rw-r--r--lib/siscomponentrecord.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/siscomponentrecord.cpp b/lib/siscomponentrecord.cpp
index 83781d1..3507bce 100644
--- a/lib/siscomponentrecord.cpp
+++ b/lib/siscomponentrecord.cpp
@@ -29,6 +29,8 @@
SISComponentNameRecord::~SISComponentNameRecord()
{
+ for (int i = 0; i < m_nameCount; ++i)
+ delete[] m_names[i];
delete[] m_names;
}
@@ -62,6 +64,7 @@ SISComponentNameRecord::fillFrom(uint8_t* buf, int base, off_t len,
// Then read ptrs.
//
m_names = new uint8_t*[n];
+ m_nameCount = n;
for (int i = 0; i < n; ++i)
{
m_namePtrs[i] = read32(p + size);