summaryrefslogtreecommitdiff
path: root/vchat-protocol.c
diff options
context:
space:
mode:
Diffstat (limited to 'vchat-protocol.c')
-rwxr-xr-xvchat-protocol.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/vchat-protocol.c b/vchat-protocol.c
index b50f511..e676b28 100755
--- a/vchat-protocol.c
+++ b/vchat-protocol.c
@@ -166,8 +166,11 @@ vcconnect (char *server, char *port)
166 } 166 }
167 167
168 /* upgrade our plain BIO to ssl */ 168 /* upgrade our plain BIO to ssl */
169 if( vc_connect_ssl( &server_conn, &vc_store ) ) 169 if( vc_connect_ssl( &server_conn, &vc_store ) ) {
170 BIO_free_all( server_conn ); 170 BIO_free_all( server_conn );
171 server_conn = NULL;
172 errno = EIO;
173 }
171 } 174 }
172 175
173 if( !server_conn ) { 176 if( !server_conn ) {
@@ -188,7 +191,8 @@ vcconnect (char *server, char *port)
188/* disconnect from server */ 191/* disconnect from server */
189void 192void
190vcdisconnect () { 193vcdisconnect () {
191 BIO_free_all( server_conn ); 194 if (server_conn)
195 BIO_free_all( server_conn );
192 serverfd = -1; 196 serverfd = -1;
193} 197}
194 198