Commit 75dc096e authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

curl_multi_cleanup: clear connection pointer for easy handles

CVE-2016-5421
Bug: https://curl.haxx.se/docs/adv_20160803C.html
Reported-by: Marcelo Echeverria and Fernando Muñoz
parent 9cb1059f
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -2157,6 +2157,8 @@ static void close_all_connections(struct Curl_multi *multi)
    conn->data = multi->closure_handle;

    sigpipe_ignore(conn->data, &pipe_st);
    conn->data->easy_conn = NULL; /* clear the easy handle's connection
                                     pointer */
    /* This will remove the connection from the cache */
    (void)Curl_disconnect(conn, FALSE);
    sigpipe_restore(&pipe_st);