summaryrefslogtreecommitdiff
path: root/socket
diff options
context:
space:
mode:
authorNicolas Dufresne <nicolas.dufresne@collabora.com>2018-06-18 08:43:17 -0400
committerNicolas Dufresne <nicolas.dufresne@collabora.com>2018-06-18 08:47:12 -0400
commit3770519e53c8fd096efd1ad7958645c01d62e5c0 (patch)
treeba689fb3dbdb6f5212a6f57eda52cae8f16677f7 /socket
parent23b5926885683987ac8706dddd8cbc195ba40d18 (diff)
Fix queue_clear replaced by queue_free error
There was two cases where instead of freeing the queue, we actually clear the queue so it's ready for reused. Notably in nice_socket_free_send_queue(), a missed name function and nicesrc element state change. This regression was introduced by: fa783b1dd727a6ee2b99a111ca24790ae850c2f7
Diffstat (limited to 'socket')
-rw-r--r--socket/socket.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/socket/socket.c b/socket/socket.c
index 684e88b..260a190 100644
--- a/socket/socket.c
+++ b/socket/socket.c
@@ -450,5 +450,6 @@ gboolean nice_socket_flush_send_queue_to_socket (GSocket *gsock,
void
nice_socket_free_send_queue (GQueue *send_queue)
{
- g_queue_free_full (send_queue, (GDestroyNotify) nice_socket_free_queued_send);
+ g_list_free_full (send_queue->head, (GDestroyNotify) nice_socket_free_queued_send);
+ g_queue_init (send_queue);
}