Message ID | 20181012154953.4682-1-ykaradzhov@vmware.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | kernel-shark-qt: Fix a simple bug in KsDataStore::_freeData() | expand |
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. */
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(+)