summaryrefslogtreecommitdiff
path: root/clone.go
diff options
context:
space:
mode:
Diffstat (limited to 'clone.go')
-rw-r--r--clone.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/clone.go b/clone.go
index 2e0fcce..b796b6e 100644
--- a/clone.go
+++ b/clone.go
@@ -30,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)