libfetch: fetch_close: make sure conn->ssl is valid before shutting down.
This commit is contained in:
parent
633c20a2e6
commit
7bb36ddaa2
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user