aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2022-12-26 09:32:43 -0800
committerGerald Combs <gerald@wireshark.org>2022-12-27 22:58:05 +0000
commite93989c56a9bb2dd54f9c2b9bf7b5caf2d22f150 (patch)
tree247954308b167f814963c2dfb2eba2bfea65e659
parent6c1ee111723791d78479df308fcaac61f3b89768 (diff)
Qt: Fix an IAX2 Analysis dialog memory leak.
Fix *** CID 1517838: Resource leaks (RESOURCE_LEAK) /builds/wireshark/wireshark/ui/qt/iax2_analysis_dialog.cpp: 311 in Iax2AnalysisDialog::Iax2AnalysisDialog(QWidget &, CaptureFile &)() 305 } 306 307 if (!cap_file_.capFile() || !cap_file_.capFile()->current_frame) { 308 err_str_ = tr("Please select an IAX2 packet."); 309 save_payload_error_ = TAP_IAX2_NO_PACKET_SELECTED; 310 updateWidgets(); >>> CID 1517838: Resource leaks (RESOURCE_LEAK) >>> Variable "sfcode" going out of scope leaks the storage it points to. 311 return; 312 } 313 314 if (!cf_read_current_record(cap_file_.capFile())) close(); 315 316 frame_data *fdata = cap_file_.capFile()->current_frame;
-rw-r--r--ui/qt/iax2_analysis_dialog.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/ui/qt/iax2_analysis_dialog.cpp b/ui/qt/iax2_analysis_dialog.cpp
index 29d08c6e69..70d65f8b13 100644
--- a/ui/qt/iax2_analysis_dialog.cpp
+++ b/ui/qt/iax2_analysis_dialog.cpp
@@ -305,6 +305,7 @@ Iax2AnalysisDialog::Iax2AnalysisDialog(QWidget &parent, CaptureFile &cf) :
}
if (!cap_file_.capFile() || !cap_file_.capFile()->current_frame) {
+ dfilter_free(sfcode);
err_str_ = tr("Please select an IAX2 packet.");
save_payload_error_ = TAP_IAX2_NO_PACKET_SELECTED;
updateWidgets();