diff options
| author | Daniel Stenberg <daniel@haxx.se> | 2007-07-29 12:54:05 +0000 | 
|---|---|---|
| committer | Daniel Stenberg <daniel@haxx.se> | 2007-07-29 12:54:05 +0000 | 
| commit | f1fa7b8ba469d9b8681e30f107b44004695b32e9 (patch) | |
| tree | 80542fd7f33b8d77ecb6f66ae13d9f3e32ed2cc9 /lib/gtls.c | |
| parent | 86ff3194fa902e131c7a105a329202058327dcc7 (diff) | |
Bug report #1759542 (http://curl.haxx.se/bug/view.cgi?id=1759542). A bad use
of a socket after it has been closed, when the FTP-SSL data connection is taken
down.
Diffstat (limited to 'lib/gtls.c')
| -rw-r--r-- | lib/gtls.c | 14 | 
1 files changed, 7 insertions, 7 deletions
| diff --git a/lib/gtls.c b/lib/gtls.c index 23c2a28b4..03572d88e 100644 --- a/lib/gtls.c +++ b/lib/gtls.c @@ -556,17 +556,17 @@ static void close_one(struct connectdata *conn,    if(conn->ssl[index].session) {      gnutls_bye(conn->ssl[index].session, GNUTLS_SHUT_RDWR);      gnutls_deinit(conn->ssl[index].session); +    conn->ssl[index].session = NULL;    } -  if(conn->ssl[index].cred) +  if(conn->ssl[index].cred) {      gnutls_certificate_free_credentials(conn->ssl[index].cred); +    conn->ssl[index].cred = NULL; +  }  } -void Curl_gtls_close(struct connectdata *conn) +void Curl_gtls_close(struct connectdata *conn, int sockindex)  { -  if(conn->ssl[0].use) -    close_one(conn, 0); -  if(conn->ssl[1].use) -    close_one(conn, 1); +  close_one(conn, sockindex);  }  /* @@ -631,8 +631,8 @@ int Curl_gtls_shutdown(struct connectdata *conn, int sockindex)    }    gnutls_certificate_free_credentials(conn->ssl[sockindex].cred); +  conn->ssl[sockindex].cred = NULL;    conn->ssl[sockindex].session = NULL; -  conn->ssl[sockindex].use = FALSE;    return retval;  } | 
