Skip to content

don't double free pkt - #1947

Merged
vmg merged 1 commit into
libgit2:developmentfrom
ethomson:double_free_pkt
Nov 5, 2013
Merged

don't double free pkt#1947
vmg merged 1 commit into
libgit2:developmentfrom
ethomson:double_free_pkt

Conversation

@ethomson

@ethomson ethomson commented Nov 5, 2013

Copy link
Copy Markdown
Member

libgit2sharp has a use case that exercises this code path, but I could not make it happen myself.

@nulltoken do you have any insight into how this got triggered in that test? I tried setting fetch specs to none, then to all, but it did not happen for me...!

@ethomson

ethomson commented Nov 5, 2013

Copy link
Copy Markdown
Member Author

(Though it's pretty obviously a double-free sort of situation even without a unit test that causes a crash.)

@carlosmn

carlosmn commented Nov 5, 2013

Copy link
Copy Markdown
Member

Pretty sure what I meant to do there was only the break, but through some rebasing or whatnot ended up leaving the git__free in there.

@carlosmn

carlosmn commented Nov 5, 2013

Copy link
Copy Markdown
Member

The only way this codepath would ever get triggered is during a non-clone fetch, where we have happened upon a set of haves that the remote has considered exhaustive enough for it to send the data, in which case it sends us ACK somehash READY telling us to get ready to receive the pack.

vmg pushed a commit that referenced this pull request Nov 5, 2013
@vmg
vmg merged commit e87d9d3 into libgit2:development Nov 5, 2013
phatblat pushed a commit to phatblat/libgit2 that referenced this pull request Sep 13, 2014
@ethomson
ethomson deleted the double_free_pkt branch February 5, 2015 15:28
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