mirror of
https://github.com/irssi/irssi.git
synced 2024-12-04 14:46:39 -05:00
Fixed some memory leaks.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@3162 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
90c61c5548
commit
1121a3fcb7
@ -530,7 +530,6 @@ static GIOChannel *irssi_ssl_get_iochannel(GIOChannel *handle, const char *mycer
|
|||||||
chan->ctx = ctx;
|
chan->ctx = ctx;
|
||||||
chan->got_cert = cert != NULL;
|
chan->got_cert = cert != NULL;
|
||||||
chan->verify = verify;
|
chan->verify = verify;
|
||||||
g_io_channel_ref(handle);
|
|
||||||
|
|
||||||
gchan = (GIOChannel *)chan;
|
gchan = (GIOChannel *)chan;
|
||||||
gchan->funcs = &irssi_ssl_channel_funcs;
|
gchan->funcs = &irssi_ssl_channel_funcs;
|
||||||
@ -541,9 +540,13 @@ static GIOChannel *irssi_ssl_get_iochannel(GIOChannel *handle, const char *mycer
|
|||||||
|
|
||||||
GIOChannel *net_connect_ip_ssl(IPADDR *ip, int port, IPADDR *my_ip, const char *cert, const char *pkey, const char *cafile, const char *capath, gboolean verify)
|
GIOChannel *net_connect_ip_ssl(IPADDR *ip, int port, IPADDR *my_ip, const char *cert, const char *pkey, const char *cafile, const char *capath, gboolean verify)
|
||||||
{
|
{
|
||||||
GIOChannel *gret = net_connect_ip(ip, port, my_ip);
|
GIOChannel *handle, *ssl_handle;
|
||||||
gret = irssi_ssl_get_iochannel(gret, cert, pkey, cafile, capath, verify);
|
|
||||||
return gret;
|
handle = net_connect_ip(ip, port, my_ip);
|
||||||
|
ssl_handle = irssi_ssl_get_iochannel(handle, cert, pkey, cafile, capath, verify);
|
||||||
|
if (ssl_handle == NULL)
|
||||||
|
g_io_channel_unref(handle);
|
||||||
|
return ssl_handle;
|
||||||
}
|
}
|
||||||
|
|
||||||
#else /* HAVE_OPENSSL */
|
#else /* HAVE_OPENSSL */
|
||||||
|
Loading…
Reference in New Issue
Block a user