You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

22 lines
519 B

--- a/src/conn_sock.c
+++ b/src/conn_sock.c
@@ -465,6 +465,9 @@ static void init_remote_sock(struct remo
static void close_sock(gpointer data, G_GNUC_UNUSED gpointer user_data)
{
+ if (data == NULL)
+ return;
+
struct remote_sock_s *sock = (struct remote_sock_s *)data;
close(sock->fd);
@@ -473,5 +476,9 @@ static void close_sock(gpointer data, G_
void close_all_readers()
{
+
+ if (local_mainfd_stdin.readers == NULL)
+ return;
+
g_ptr_array_foreach(local_mainfd_stdin.readers, close_sock, NULL);
}