Skip to content

conn: fix hostname move on connection reuse#18995

Closed
icing wants to merge 1 commit into
curl:masterfrom
icing:conn-move-hostname
Closed

conn: fix hostname move on connection reuse#18995
icing wants to merge 1 commit into
curl:masterfrom
icing:conn-move-hostname

Conversation

@icing

@icing icing commented Oct 10, 2025

Copy link
Copy Markdown
Contributor

When reusing a connection, the host and conn_to_host hostname structs are moved from the template connection onto the existing one.

There was a NULLing of a tempplate member missing in conn_to_host which could then lead to a double free.

Make this struct move into a static function, doing the correct thing for both struct hostname in a connection.

reported-by: Joshua Rogers

When reusing a connection, the `host` and `conn_to_host` hostname
structs are moved from the template connection onto the existing one.

There was a NULLing of a tempplate member missing in `conn_to_host`
which could then lead to a double free.

Make this struct move into a static function, doing the correct
thing for both `struct hostname` in a connection.

reported-by: Joshua Rogers
@icing
icing requested a review from bagder October 10, 2025 13:42
@bagder bagder closed this in bf41be6 Oct 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants