Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Unbreak git_remote_ls on a local transport after disconnecting. #1678

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

arthurschreiber
Copy link
Member

This fixes the issue introduced in #1675, where git_remote_ls would stop working on local transports after disconnecting.

@carlosmn @arrbee Can you take a look?

@@ -600,6 +600,8 @@ static void local_free(git_transport *transport)
{
transport_local *t = (transport_local *)transport;

git_vector_free(&t->refs);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This wouldn't free the contents of the vector, so we're back to leaking. You need to have the same git_vector_foreach here that you have in local_connect.

@arthurschreiber
Copy link
Member Author

@carlosmn Pushed a fix.

@carlosmn
Copy link
Member

Looks good.

@arrbee
Copy link
Member

arrbee commented Jun 25, 2013

Thanks for adding a test!

arrbee added a commit that referenced this pull request Jun 25, 2013
…disconnect

Unbreak git_remote_ls on a local transport after disconnecting.
@arrbee arrbee merged commit d0c36a0 into libgit2:development Jun 25, 2013
@arthurschreiber arthurschreiber deleted the unbreak-local-ls-after-disconnect branch June 25, 2013 17:48
@arthurschreiber
Copy link
Member Author

Yeah. Unfortunately, that issue is now part of the 0.19.0 release 😭

phatblat pushed a commit to phatblat/libgit2 that referenced this pull request Sep 13, 2014
…-after-disconnect

Unbreak git_remote_ls on a local transport after disconnecting.
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.

3 participants