Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2sharp.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornulltoken <emeric.fermas@gmail.com>2014-06-01 21:46:21 +0400
committernulltoken <emeric.fermas@gmail.com>2014-06-02 21:36:31 +0400
commit9e82f3043e01c0fb5d901d0dbd2223e0de49b9d8 (patch)
tree5c8b6a175d396c430db84179aefd420dbcc6e78e
parent580dee60f05497812a7d788147b74052181c9f55 (diff)
Fix wrong handle lifecycle
git_branch_delete() only frees the handle upon success.
-rw-r--r--LibGit2Sharp/Core/Proxy.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/LibGit2Sharp/Core/Proxy.cs b/LibGit2Sharp/Core/Proxy.cs
index 1e40edee..ed6a39b2 100644
--- a/LibGit2Sharp/Core/Proxy.cs
+++ b/LibGit2Sharp/Core/Proxy.cs
@@ -161,8 +161,8 @@ namespace LibGit2Sharp.Core
using (ThreadAffinity())
{
int res = NativeMethods.git_branch_delete(reference);
- reference.SetHandleAsInvalid();
Ensure.ZeroResult(res);
+ reference.SetHandleAsInvalid();
}
}