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/nss.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/nss.c')
-rw-r--r-- | lib/nss.c | 15 |
1 files changed, 5 insertions, 10 deletions
@@ -384,18 +384,13 @@ Curl_nss_check_cxn(struct connectdata *conn) /* * This function is called when an SSL connection is closed. */ -void Curl_nss_close(struct connectdata *conn) +void Curl_nss_close(struct connectdata *conn, int sockindex) { - int i; - - for(i=0; i<2; i++) { - struct ssl_connect_data *connssl = &conn->ssl[i]; + struct ssl_connect_data *connssl = &conn->ssl[sockindex]; - if(connssl->handle) { - PR_Close(connssl->handle); - connssl->handle = NULL; - } - connssl->use = FALSE; /* get back to ordinary socket usage */ + if(connssl->handle) { + PR_Close(connssl->handle); + connssl->handle = NULL; } } |