summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--agent/agent.c1
-rw-r--r--agent/candidate.c3
-rw-r--r--agent/candidate.h1
3 files changed, 5 insertions, 0 deletions
diff --git a/agent/agent.c b/agent/agent.c
index 3436bd2..9a87e7a 100644
--- a/agent/agent.c
+++ b/agent/agent.c
@@ -1293,6 +1293,7 @@ nice_agent_main_context_attach (
g_source_set_callback (source, (GSourceFunc) nice_agent_g_source_cb,
ctx, (GDestroyNotify) io_ctx_free);
g_source_attach (source, NULL);
+ candidate->source = source;
}
}
diff --git a/agent/candidate.c b/agent/candidate.c
index 72f7c66..25786c9 100644
--- a/agent/candidate.c
+++ b/agent/candidate.c
@@ -26,6 +26,9 @@ nice_candidate_free (NiceCandidate *candidate)
if (candidate->sock.addr.addr_ipv4 != 0)
nice_udp_socket_close (&(candidate->sock));
+ if (candidate->source)
+ g_source_destroy (candidate->source);
+
g_slice_free (NiceCandidate, candidate);
}
diff --git a/agent/candidate.h b/agent/candidate.h
index b2bee4e..b2da864 100644
--- a/agent/candidate.h
+++ b/agent/candidate.h
@@ -31,6 +31,7 @@ struct _NiceCandidate
NiceUDPSocket sock;
gchar username[128];
gchar password[128];
+ GSource *source;
};