diff options
author | Daniel Stenberg <daniel@haxx.se> | 2006-11-09 21:54:33 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2006-11-09 21:54:33 +0000 |
commit | 624745ab20a7826e18f300cc19ef496f0224dad0 (patch) | |
tree | 50c0d387ade37f25fa30c7ceb013c4faaa9f1150 /lib | |
parent | 9354822e09ce11fce78a45a897fe2a184565a35e (diff) |
Dmitriy Sergeyev found a SIGSEGV with his test04.c example posted on 7 Nov
2006. It turned out we wrongly assumed that the connection cache was present
when tearing down a connection.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/url.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -1804,7 +1804,10 @@ CURLcode Curl_disconnect(struct connectdata *conn) if(-1 != conn->connectindex) { /* unlink ourselves! */ infof(data, "Closing connection #%ld\n", conn->connectindex); - data->state.connc->connects[conn->connectindex] = NULL; + if(data->state.connc) + /* only clear the table entry if we still know in which cache we + used to be in */ + data->state.connc->connects[conn->connectindex] = NULL; } #ifdef USE_LIBIDN |