summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYouness Alaoui <youness.alaoui@collabora.co.uk>2010-12-22 23:20:00 (GMT)
committerYouness Alaoui <youness.alaoui@collabora.co.uk>2010-12-22 23:20:00 (GMT)
commitfae5482e2782809cda72990039706b56ee397d48 (patch)
treef7f2cbcd111f48a60e058961dd5440e7243d97fc
parent603e42ac39fa361e73aaf340bc31b287383fb3d6 (diff)
downloadlibnice-fae5482e2782809cda72990039706b56ee397d48.tar.gz
libnice-fae5482e2782809cda72990039706b56ee397d48.tar.xz
Do not destroy the object until we're done using it..
-rw-r--r--socket/turn.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/socket/turn.c b/socket/turn.c
index e5502f1..20c7fdd 100644
--- a/socket/turn.c
+++ b/socket/turn.c
@@ -936,9 +936,6 @@ nice_turn_socket_parse_recv (NiceSocket *sock, NiceSocket **from_sock,
&peer_len);
nice_address_set_from_sockaddr (&to, &peer);
- g_free (priv->current_create_permission_msg);
- priv->current_create_permission_msg = NULL;
-
/* unathorized => resend with realm and nonce */
if (stun_message_get_class (&msg) == STUN_ERROR) {
int code = -1;
@@ -990,6 +987,8 @@ nice_turn_socket_parse_recv (NiceSocket *sock, NiceSocket **from_sock,
/* send enqued data */
socket_dequeue_all_data (priv, &to);
}
+ g_free (priv->current_create_permission_msg);
+ priv->current_create_permission_msg = NULL;
}
}