libfetch: fetch_close: make sure conn->ssl is valid before shutting down.

This commit is contained in:
Juan RP 2014-06-28 12:12:03 +02:00
parent 633c20a2e6
commit 7bb36ddaa2

View File

@ -732,8 +732,10 @@ fetch_close(conn_t *conn)
int ret;
#ifdef WITH_SSL
SSL_shutdown(conn->ssl);
SSL_free(conn->ssl);
if (conn->ssl) {
SSL_shutdown(conn->ssl);
SSL_free(conn->ssl);
}
#endif
ret = close(conn->sd);
if (conn->cache_url)