summaryrefslogtreecommitdiff
path: root/clone.go
diff options
context:
space:
mode:
Diffstat (limited to 'clone.go')
-rw-r--r--clone.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/clone.go b/clone.go
index 958e65d..b796b6e 100644
--- a/clone.go
+++ b/clone.go
@@ -2,7 +2,6 @@ package git
/*
#include <git2.h>
-#include <git2/errors.h>
*/
import "C"
@@ -31,6 +30,7 @@ func Clone(url string, path string, options *CloneOptions) (*Repository, error)
var copts C.git_clone_options
populateCloneOptions(&copts, options)
+ defer freeCheckoutOpts(&copts.checkout_opts)
if len(options.CheckoutBranch) != 0 {
copts.checkout_branch = C.CString(options.CheckoutBranch)