Commit 89fc9e77 authored by Carlos Martín Nieto's avatar Carlos Martín Nieto Committed by GitHub

Merge pull request #365 from AaronO/fix/memleak-tree-entrybyname

Fix memleaks in Tree.EntryBy(Name/Path/Index), fixes #313
parents 97f17222 ee2a0238
......@@ -87,6 +87,7 @@ func (t Tree) EntryByPath(path string) (*TreeEntry, error) {
if ret < 0 {
return nil, MakeGitError(ret)
defer C.git_tree_entry_free(entry)
return newTreeEntry(entry), nil
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment