Commit 3bf02b0e authored by Youness Alaoui's avatar Youness Alaoui

Fix refcounting correctly. Don't forget to decrement the reference kept by the GList

parent 7b1c3bb1
......@@ -398,7 +398,7 @@ static gboolean priv_conn_check_tick_unlocked (gpointer pointer)
/* step: find the highest priority waiting check and send it */
for (i = agent->streams; i ; i = i->next) {
Stream *stream = i->data;
pair = priv_conn_check_find_next_waiting (stream->conncheck_list);
if (pair)
break;
......
......@@ -347,7 +347,10 @@ priv_forget_send_request (gpointer pointer)
g_source_destroy (req->source);
g_source_unref (req->source);
req->priv->send_requests = g_list_remove (req->priv->send_requests, req);
if (g_list_index (req->priv->send_requests, req) != -1) {
req->priv->send_requests = g_list_remove (req->priv->send_requests, req);
(void)g_atomic_int_dec_and_test (&req->ref);
}
g_static_rec_mutex_unlock (&req->priv->nice->mutex);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment