Skip to content

socks_sspi: simplify, clean up Curl_SOCKS5_gssapi_negotiate#18315

Closed
bagder wants to merge 1 commit intomasterfrom
bagder/socks-sspi
Closed

socks_sspi: simplify, clean up Curl_SOCKS5_gssapi_negotiate#18315
bagder wants to merge 1 commit intomasterfrom
bagder/socks-sspi

Conversation

@bagder
Copy link
Copy Markdown
Member

@bagder bagder commented Aug 19, 2025

This function returned error on MANY places, each with its own cleanup sequence and by the look of it almost all of them were incomplete, making them leak resources on errors.

This take now gotos to the error label where it cleans everything up before returning error. This also simplifies the function a lot.

I don't build on Windows and this code is Windows specific, so I cannot verify. I'm not sure much of this is run in tests, so it is fragile to change.

@bagder bagder marked this pull request as ready for review August 19, 2025 10:48
bagder added a commit that referenced this pull request Aug 22, 2025
This function returned error on MANY places, each with its own cleanup
sequence and by the look of it almost all of them were incomplete,
making them leak resources on errors.

This take now gotos to the error label where it cleans everything up
before returning error. This also simplifies the function a lot.

Closes #18315
@bagder bagder force-pushed the bagder/socks-sspi branch from 9384af9 to 38e129d Compare August 22, 2025 07:16
This function returned error on MANY places, each with its own cleanup
sequence and by the look of it almost all of them were incomplete,
making them leak resources on errors.

This take now gotos to the error label where it cleans everything up
before returning error. This also simplifies the function a lot.

Closes #18315
@bagder bagder force-pushed the bagder/socks-sspi branch from 38e129d to 401e496 Compare August 22, 2025 08:47
@bagder bagder closed this in 0540742 Aug 26, 2025
@bagder bagder deleted the bagder/socks-sspi branch August 26, 2025 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

1 participant