Skip to contentSkip to conversation

kernel-shark-qt: Fix a simple bug in KsDataStore::_freeData()

PATCH New Yordan Karadzhov 1 participant 1 message Oct 12, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kernel-shark-qt: Fix a simple bug in KsDataStore::_freeData()

After freeing the memory used to store the tracing data, this function has to set the _dataSize field to zero.

---
 kernel-shark-qt/src/KsUtils.cpp | 2 ++
 1 file changed, 2 insertions(+)
kernel-shark-qt/src/KsUtils.cpp +2 -0
index 13b648e..5e4c9c8 100644
@@ -144,6 +144,8 @@ void KsDataStore::_freeData()
 		free(_rows);
 		_rows = nullptr;
 	}
+
+	_dataSize = 0;
 }
 
 /** Reload the trace data. */
Signature · 1 line
2.17.1