udp-turn: Remove request before freeing it
authorOlivier Crête <olivier.crete@collabora.com>
Mon, 3 May 2021 20:58:01 +0000 (16:58 -0400)
committerOlivier Crête <olivier.crete@collabora.com>
Mon, 3 May 2021 22:42:43 +0000 (18:42 -0400)
As removing the request from the queue looks into the SendRequest, one
needs to unqueue it before freeing it.

socket/udp-turn.c

index 95df738..3c2e718 100644 (file)
@@ -1099,8 +1099,8 @@ priv_forget_send_request_timeout (gpointer pointer)
     return G_SOURCE_REMOVE;
   }
 
-  send_request_free (req);
   g_queue_remove (req->priv->send_requests, req);
+  send_request_free (req);
 
   g_mutex_unlock (&mutex);