diff options
Diffstat (limited to 'ui')
-rw-r--r-- | ui/qt/service_response_time_dialog.cpp | 15 | ||||
-rw-r--r-- | ui/qt/service_response_time_dialog.h | 1 |
2 files changed, 13 insertions, 3 deletions
diff --git a/ui/qt/service_response_time_dialog.cpp b/ui/qt/service_response_time_dialog.cpp index 1e142efea9..b79ce7fd10 100644 --- a/ui/qt/service_response_time_dialog.cpp +++ b/ui/qt/service_response_time_dialog.cpp @@ -210,6 +210,14 @@ ServiceResponseTimeDialog::ServiceResponseTimeDialog(QWidget &parent, CaptureFil this, SLOT(statsTreeWidgetItemChanged())); } +ServiceResponseTimeDialog::~ServiceResponseTimeDialog() +{ + if (srt_data_.srt_array) { + free_srt_table(srt_, srt_data_.srt_array, NULL, NULL); + g_array_free(srt_data_.srt_array, TRUE); + } +} + TapParameterDialog *ServiceResponseTimeDialog::createSrtDialog(QWidget &parent, const QString cfg_str, const QString filter, CaptureFile &cf) { if (!cfg_str_to_srt_.contains(cfg_str)) { @@ -269,6 +277,10 @@ void ServiceResponseTimeDialog::endRetapPackets() void ServiceResponseTimeDialog::fillTree() { + if (srt_data_.srt_array) { + free_srt_table(srt_, srt_data_.srt_array, NULL, NULL); + g_array_free(srt_data_.srt_array, TRUE); + } srt_data_.srt_array = g_array_new(FALSE, TRUE, sizeof(srt_stat_table*)); srt_data_.user_data = this; @@ -301,9 +313,6 @@ void ServiceResponseTimeDialog::fillTree() statsTreeWidget()->setSortingEnabled(true); removeTapListeners(); - - free_srt_table(srt_, srt_data_.srt_array, NULL, NULL); - g_array_free(srt_data_.srt_array, TRUE); } QList<QVariant> ServiceResponseTimeDialog::treeItemData(QTreeWidgetItem *ti) const diff --git a/ui/qt/service_response_time_dialog.h b/ui/qt/service_response_time_dialog.h index f3273ac6ea..ec953eb423 100644 --- a/ui/qt/service_response_time_dialog.h +++ b/ui/qt/service_response_time_dialog.h @@ -36,6 +36,7 @@ class ServiceResponseTimeDialog : public TapParameterDialog public: ServiceResponseTimeDialog(QWidget &parent, CaptureFile &cf, struct register_srt *srt, const QString filter, int help_topic = 0); + ~ServiceResponseTimeDialog(); static TapParameterDialog *createSrtDialog(QWidget &parent, const QString cfg_str, const QString filter, CaptureFile &cf); public slots: |