diff options
author | Matthias Andree <matthias.andree@gmx.de> | 2008-11-13 11:51:49 +0000 |
---|---|---|
committer | Matthias Andree <matthias.andree@gmx.de> | 2008-11-13 11:51:49 +0000 |
commit | 8a31d3b93a492c583ccd97a5a27ab4cb466ff138 (patch) | |
tree | e654374a97afc55a68f7adba1bebfb9973ec4dfa /socket.c | |
parent | 60513c9658c230d28914df59e822fcac5a84aabc (diff) | |
download | fetchmail-8a31d3b93a492c583ccd97a5a27ab4cb466ff138.tar.gz fetchmail-8a31d3b93a492c583ccd97a5a27ab4cb466ff138.tar.bz2 fetchmail-8a31d3b93a492c583ccd97a5a27ab4cb466ff138.zip |
SSL_free(context) when SSL_connect fails, plugging memleak. By Seiichi Ikarashi.
svn path=/branches/BRANCH_6-3/; revision=5237
Diffstat (limited to 'socket.c')
-rw-r--r-- | socket.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -906,6 +906,8 @@ int SSLOpen(int sock, char *mycert, char *mykey, char *myproto, int certck, char if (SSL_set_fd(_ssl_context[sock], sock) == 0 || SSL_connect(_ssl_context[sock]) < 1) { ERR_print_errors_fp(stderr); + SSL_free( _ssl_context[sock] ); + _ssl_context[sock] = NULL; SSL_CTX_free(_ctx[sock]); _ctx[sock] = NULL; return(-1); |