Skip to content

Commit e701c25

Browse files
committed
Fix leaked handle in Tree
1 parent c7be068 commit e701c25

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

LibGit2Sharp/Tree.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ private TreeEntry RetrieveFromPath(FilePath relativePath)
6161
string filename = posixPath.Split('/').Last();
6262

6363
TreeEntrySafeHandle handle = NativeMethods.git_tree_entry_byname(objectPtr, filename);
64+
objectPtr.SafeDispose();
6465

6566
if (handle.IsInvalid)
6667
{

0 commit comments

Comments
 (0)