summaryrefslogtreecommitdiff
path: root/cherrypick.go
diff options
context:
space:
mode:
authorCarlos Martín Nieto <[email protected]>2017-07-08 16:51:22 +0200
committerGitHub <[email protected]>2017-07-08 16:51:22 +0200
commit08db2e2c167404c5ed9be0fc1c995e41bad479bb (patch)
tree4a9c1357f3682d4134318e73ef85aa172cbfbd48 /cherrypick.go
parent29c0b730076fe402c22ea3e3a11a7ed541663637 (diff)
parent55a1096141519a1f380d0702671cfe9bf90ec435 (diff)
Merge pull request #393 from libgit2/cmn/keepalive-all-the-things
KeepAlive all the things
Diffstat (limited to 'cherrypick.go')
-rw-r--r--cherrypick.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/cherrypick.go b/cherrypick.go
index afc1b7e..8983a7a 100644
--- a/cherrypick.go
+++ b/cherrypick.go
@@ -66,6 +66,8 @@ func (v *Repository) Cherrypick(commit *Commit, opts CherrypickOptions) error {
defer freeCherrypickOpts(cOpts)
ecode := C.git_cherrypick(v.ptr, commit.cast_ptr, cOpts)
+ runtime.KeepAlive(v)
+ runtime.KeepAlive(commit)
if ecode < 0 {
return MakeGitError(ecode)
}