summaryrefslogtreecommitdiff
path: root/ui/voip_calls.c
diff options
context:
space:
mode:
Diffstat (limited to 'ui/voip_calls.c')
-rw-r--r--ui/voip_calls.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/ui/voip_calls.c b/ui/voip_calls.c
index 17643d796f..fff48ef5c6 100644
--- a/ui/voip_calls.c
+++ b/ui/voip_calls.c
@@ -290,13 +290,7 @@ voip_calls_reset_all_taps(voip_calls_tapinfo_t *tapinfo)
g_list_free(tapinfo->rtp_stream_list);
tapinfo->rtp_stream_list = NULL;
- if (!tapinfo->h245_labels) {
- /*
- * XXX - given that we set this in fff, will this ever be
- * the case?
- */
- tapinfo->h245_labels = g_new0(h245_labels_t, 1);
- } else {
+ if (tapinfo->h245_labels) {
memset(tapinfo->h245_labels, 0, sizeof(h245_labels_t));
}
@@ -2222,7 +2216,9 @@ h245dg_calls_init_tap(voip_calls_tapinfo_t *tap_id_base)
{
GString *error_string;
- tap_id_base->h245_labels = g_new0(h245_labels_t, 1);
+ if (!tap_id_base->h245_labels) {
+ tap_id_base->h245_labels = g_new0(h245_labels_t, 1);
+ }
error_string = register_tap_listener("h245dg", tap_base_to_id(tap_id_base, tap_id_offset_h245dg_), NULL,
0,
@@ -2242,6 +2238,10 @@ h245dg_calls_init_tap(voip_calls_tapinfo_t *tap_id_base)
void
remove_tap_listener_h245dg_calls(voip_calls_tapinfo_t *tap_id_base)
{
+ if (tap_id_base->h245_labels) {
+ g_free(tap_id_base->h245_labels);
+ tap_id_base->h245_labels = NULL;
+ }
remove_tap_listener(tap_base_to_id(tap_id_base, tap_id_offset_h245dg_));
}