Visitar URL original
http: Move call to ‘git_http_client_free’ from ‘http_free’ to ‘http_close’. by civodul · Pull Request #7372 · libgit2/libgit2 · GitHub
Skip to content

http: Move call to ‘git_http_client_free’ from ‘http_free’ to ‘http_close’. - #7372

Open
civodul wants to merge 1 commit into
libgit2:mainfrom
civodul:pr/remote-disconnect-fd-leak-fix
Open

civodul wants to merge 1 commit into
libgit2:mainfrom
civodul:pr/remote-disconnect-fd-leak-fix

Conversation

@civodul

@civodul civodul commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

Fixes a bug whereby ‘git_remote_disconnect’ would not actually close the socket for the connection to the remote; instead one would have to call ‘git_remote_free’ to make that happen.

This commit fixes that by having the socket closed when ‘git_remote_disconnect’ is called, as one would expect.

Fixes: #7356

…lose’.

Fixes a bug whereby ‘git_remote_disconnect’ would not actually close the
socket for the connection to the remote; instead one would have to call
‘git_remote_free’ to make that happen.

This commit fixes that by having the socket closed when
‘git_remote_disconnect’ is called, as one would expect.

Fixes: libgit2#7356
@McSinyx

McSinyx commented Oct 10, 2026

Copy link
Copy Markdown

I think http_client_close should be exported and called instead, to avoid reallocating the client on http_action and http_close loops.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

git_remote_disconnect leaves open file descriptors behind

2 participants