forked from osmocom/wireshark
voip_calls_dialog/voip_calls: Fix for #16952
The fix solves issue #16952. It reverts commit88813716
which introduced memory leak which causes the issue. The original issue with duplicating entries is solved too. Because commit was cherry picked to 3.4.0 (might be in more branches), this patch should be cherry picked too. (cherry picked from commit71e3969d63
)
This commit is contained in:
parent
0985a2ef2a
commit
4bbab577e7
|
@ -183,6 +183,12 @@ void VoipCallsDialog::tapReset(void *tapinfo_ptr)
|
|||
VoipCallsDialog *voip_calls_dialog = static_cast<VoipCallsDialog *>(tapinfo->tap_data);
|
||||
voip_calls_dialog->call_infos_model_->removeAllCalls();
|
||||
voip_calls_reset_all_taps(tapinfo);
|
||||
|
||||
// Leave old graph_analysis as is and allocate new one
|
||||
voip_calls_dialog->sequence_info_->unref();
|
||||
voip_calls_dialog->tapinfo_.graph_analysis = sequence_analysis_info_new();
|
||||
voip_calls_dialog->tapinfo_.graph_analysis->name = "voip";
|
||||
voip_calls_dialog->sequence_info_ = new SequenceInfo(voip_calls_dialog->tapinfo_.graph_analysis);
|
||||
}
|
||||
|
||||
tap_packet_status VoipCallsDialog::tapPacket(void *, packet_info *, epan_dissect_t *, const void *)
|
||||
|
|
|
@ -574,9 +574,7 @@ rtp_reset(void *tap_offset_ptr)
|
|||
tapinfo->rtpstream_list = NULL;
|
||||
tapinfo->nrtpstreams = 0;
|
||||
|
||||
if (tapinfo->graph_analysis) {
|
||||
sequence_analysis_list_free(tapinfo->graph_analysis);
|
||||
}
|
||||
// Do not touch graph_analysis, it is handled by caller
|
||||
|
||||
if (tapinfo->tap_reset) {
|
||||
tapinfo->tap_reset(tapinfo);
|
||||
|
|
Loading…
Reference in New Issue