aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt/funnel_statistics.cpp
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2021-11-10 11:48:26 -0800
committerGerald Combs <gerald@wireshark.org>2021-11-10 11:48:26 -0800
commiteda588d1a62bb3cff107f08d0b6310049708d069 (patch)
tree660d811a5bc39fa43af82a7040a417c36f0d35d6 /ui/qt/funnel_statistics.cpp
parent7a30021aefa1810b03f330fcbd07dcafff593a7a (diff)
Revert "Qt: fix memory leaks found by Visual Leak Detector"
This reverts commit c2edb44a9ac2bcd6bff267bd4d7301caff248eca. While we should definitely avoid leaking memory, this runs up against the Qt code's assumption that it will always have valid epan data. Fixes #17590. Fixes #17719.
Diffstat (limited to 'ui/qt/funnel_statistics.cpp')
-rw-r--r--ui/qt/funnel_statistics.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/ui/qt/funnel_statistics.cpp b/ui/qt/funnel_statistics.cpp
index a56492c339..4bbaba8828 100644
--- a/ui/qt/funnel_statistics.cpp
+++ b/ui/qt/funnel_statistics.cpp
@@ -155,8 +155,13 @@ FunnelStatistics::FunnelStatistics(QObject *parent, CaptureFile &cf) :
FunnelStatistics::~FunnelStatistics()
{
- delete(funnel_ops_id_);
- delete(funnel_ops_);
+ // At this point we're probably closing the program and will shortly
+ // call epan_cleanup, which calls ProgDlg__gc and TextWindow__gc.
+ // They in turn depend on funnel_ops_ being valid.
+ memset(funnel_ops_id_, 0, sizeof(struct _funnel_ops_id_t));
+ memset(funnel_ops_, 0, sizeof(struct _funnel_ops_t));
+ // delete(funnel_ops_id_);
+ // delete(funnel_ops_);
}
void FunnelStatistics::retapPackets()