diff mbox series

[v2,01/23] kernel-shark-qt: Fix a simple bug in KsDataStore::_freeData()

Message ID 20181016155232.5257-2-ykaradzhov@vmware.com (mailing list archive)
State Accepted
Headers show
Series Add Qt-based GUI for KernelShark | expand

Commit Message

Yordan Karadzhov Oct. 16, 2018, 3:52 p.m. UTC
After freeing the memory used to store the tracing data, this
function has to set the _dataSize field to zero.

Signed-off-by: Yordan Karadzhov <ykaradzhov@vmware.com>
---
 kernel-shark-qt/src/KsUtils.cpp | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/kernel-shark-qt/src/KsUtils.cpp b/kernel-shark-qt/src/KsUtils.cpp
index 13b648e..5e4c9c8 100644
--- a/kernel-shark-qt/src/KsUtils.cpp
+++ b/kernel-shark-qt/src/KsUtils.cpp
@@ -144,6 +144,8 @@  void KsDataStore::_freeData()
 		free(_rows);
 		_rows = nullptr;
 	}
+
+	_dataSize = 0;
 }
 
 /** Reload the trace data. */