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;
This commit is contained in:
Gerald Combs 2022-12-26 09:32:43 -08:00
parent 6c1ee11172
commit e93989c56a
1 changed files with 1 additions and 0 deletions

View File

@ -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();