Commit 2cf26d4f authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

copy the name properly when re-using a connection

parent f470a131
Loading
Loading
Loading
Loading
+3 −2
Original line number Original line Diff line number Diff line
@@ -2022,8 +2022,9 @@ static CURLcode Connect(struct UrlData *data,
    free(conn->path);        /* free the previous path pointer */
    free(conn->path);        /* free the previous path pointer */


    /* we need these pointers if we speak over a proxy */
    /* we need these pointers if we speak over a proxy */
    conn->name = old_conn->name;
    strcpy(conn->gname, old_conn->gname); /* copy the name */
    conn->hostname = old_conn->hostname;
    conn->name = conn->gname;
    conn->hostname = old_conn->gname;


    conn->path = path;       /* use this one */
    conn->path = path;       /* use this one */
    conn->ppath = path;      /* set this too */
    conn->ppath = path;      /* set this too */