forked from osmocom/wireshark
Qt: RTP Analysis Dialog leaks
Delete the tab name. Free the rtpstream_info_calc data after use.
This commit is contained in:
parent
c9fee454e9
commit
44a38f0ad4
|
@ -334,6 +334,7 @@ void RtpAnalysisDialog::deleteTabInfo(tab_info_t *tab_info)
|
||||||
delete tab_info->jitter_vals;
|
delete tab_info->jitter_vals;
|
||||||
delete tab_info->diff_vals;
|
delete tab_info->diff_vals;
|
||||||
delete tab_info->delta_vals;
|
delete tab_info->delta_vals;
|
||||||
|
delete tab_info->tab_name;
|
||||||
// tab_info->tree_widget was deleted by ui
|
// tab_info->tree_widget was deleted by ui
|
||||||
// tab_info->statistics_label was deleted by ui
|
// tab_info->statistics_label was deleted by ui
|
||||||
rtpstream_info_free_data(&tab_info->stream);
|
rtpstream_info_free_data(&tab_info->stream);
|
||||||
|
@ -350,6 +351,7 @@ int RtpAnalysisDialog::addTabUI(tab_info_t *new_tab)
|
||||||
.arg(s_calc.dst_addr_str)
|
.arg(s_calc.dst_addr_str)
|
||||||
.arg(s_calc.dst_port)
|
.arg(s_calc.dst_port)
|
||||||
.arg(int_to_qstring(s_calc.ssrc, 8, 16)));
|
.arg(int_to_qstring(s_calc.ssrc, 8, 16)));
|
||||||
|
rtpstream_info_calc_free(&s_calc);
|
||||||
|
|
||||||
QWidget *tab = new QWidget();
|
QWidget *tab = new QWidget();
|
||||||
tab->setProperty("tab_data", QVariant::fromValue((void *)new_tab));
|
tab->setProperty("tab_data", QVariant::fromValue((void *)new_tab));
|
||||||
|
@ -784,6 +786,7 @@ void RtpAnalysisDialog::updateStatistics()
|
||||||
.arg(s_calc.clock_drift_ms, 0, 'f', 0);
|
.arg(s_calc.clock_drift_ms, 0, 'f', 0);
|
||||||
stats_tables += QString("<tr><th align=\"left\">Freq Drift</th><td>%1 Hz (%2 %)</td></tr>") // XXX Terminology?
|
stats_tables += QString("<tr><th align=\"left\">Freq Drift</th><td>%1 Hz (%2 %)</td></tr>") // XXX Terminology?
|
||||||
.arg(s_calc.freq_drift_hz, 0, 'f', 0).arg(s_calc.freq_drift_perc, 0, 'f', 2);
|
.arg(s_calc.freq_drift_hz, 0, 'f', 0).arg(s_calc.freq_drift_perc, 0, 'f', 2);
|
||||||
|
rtpstream_info_calc_free(&s_calc);
|
||||||
stats_tables += "</table></p>\n";
|
stats_tables += "</table></p>\n";
|
||||||
|
|
||||||
tabs_[i]->statistics_label->setText(stats_tables);
|
tabs_[i]->statistics_label->setText(stats_tables);
|
||||||
|
|
Loading…
Reference in New Issue