diff options
author | Olivier CrĂȘte <olivier.crete@collabora.com> | 2016-02-29 16:11:18 -0500 |
---|---|---|
committer | Olivier CrĂȘte <olivier.crete@collabora.com> | 2016-05-26 16:08:35 -0400 |
commit | 8ee6d1bbed87fda37ade7b5c5d9483f41037b06a (patch) | |
tree | f317ffb25460bb56822c455fadd04f3a550a4128 /socket | |
parent | 8f1f615e92cd56ad4d8487457c2fde2c4aaa51d9 (diff) | |
download | libnice-8ee6d1bbed87fda37ade7b5c5d9483f41037b06a.tar.gz |
udp-turn: Fix binding timeout leak
Diffstat (limited to 'socket')
-rw-r--r-- | socket/udp-turn.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/socket/udp-turn.c b/socket/udp-turn.c index da43b19..d0e20b2 100644 --- a/socket/udp-turn.c +++ b/socket/udp-turn.c @@ -1098,6 +1098,13 @@ priv_binding_timeout (gpointer data) ChannelBinding *b = i->data; if (b->timeout_source == source) { b->renew = TRUE; + + /* Remove any existing timer */ + if (b->timeout_source) { + g_source_destroy (b->timeout_source); + g_source_unref (b->timeout_source); + } + /* Install timer to expire the permission */ b->timeout_source = priv_timeout_add_with_context (priv, STUN_EXPIRE_TIMEOUT, TRUE, priv_binding_expired_timeout, priv); |