lm_old_socket_close() leaks a file descriptor if connect() has not
succeeded.
socket_close_io_channel() is not called on the socket file descriptor if
lm_old_socket_close() is called between when connect() has been called
and when it has succeeded/failed.
The patch came from the user emezeske on github.
--- a/loudmouth/lm-old-socket.c Sat Oct 10 19:10:37 2009 +0200
+++ b/loudmouth/lm-old-socket.c Sat Oct 10 19:55:27 2009 +0200
@@ -951,6 +951,9 @@
data = socket->connect_data;
if (data) {
+ if (data->io_channel) {
+ socket_close_io_channel (data->io_channel);
+ }
socket->connect_data = NULL;
g_free (data);
}