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

  1. --- a/src/conn_sock.c
  2. +++ b/src/conn_sock.c
  3. @@ -465,6 +465,9 @@ static void init_remote_sock(struct remo
  4. static void close_sock(gpointer data, G_GNUC_UNUSED gpointer user_data)
  5. {
  6. + if (data == NULL)
  7. + return;
  8. +
  9. struct remote_sock_s *sock = (struct remote_sock_s *)data;
  10. close(sock->fd);
  11. @@ -473,5 +476,9 @@ static void close_sock(gpointer data, G_
  12. void close_all_readers()
  13. {
  14. +
  15. + if (local_mainfd_stdin.readers == NULL)
  16. + return;
  17. +
  18. g_ptr_array_foreach(local_mainfd_stdin.readers, close_sock, NULL);
  19. }