From 380d0d3d38036991b85cd089fa6b09ddc453bf5c Mon Sep 17 00:00:00 2001 From: Jilles Tjoelker Date: Sun, 8 Jul 2007 19:00:42 +0000 Subject: [PATCH] SSL: Fix assertion failures when net_connect_ip() detects an error, e.g. bad bind address, localhost connection refused. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4577 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/core/network-openssl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/core/network-openssl.c b/src/core/network-openssl.c index 9ca16e07..66445c03 100644 --- a/src/core/network-openssl.c +++ b/src/core/network-openssl.c @@ -312,6 +312,8 @@ GIOChannel *net_connect_ip_ssl(IPADDR *ip, int port, IPADDR *my_ip, const char * GIOChannel *handle, *ssl_handle; handle = net_connect_ip(ip, port, my_ip); + if (handle == NULL) + return NULL; ssl_handle = irssi_ssl_get_iochannel(handle, cert, pkey, cafile, capath, verify); if (ssl_handle == NULL) g_io_channel_unref(handle);