From e93989c56a9bb2dd54f9c2b9bf7b5caf2d22f150 Mon Sep 17 00:00:00 2001 From: Gerald Combs Date: Mon, 26 Dec 2022 09:32:43 -0800 Subject: 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; --- ui/qt/iax2_analysis_dialog.cpp | 1 + 1 file changed, 1 insertion(+) 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(); -- cgit v1.2.3