summaryrefslogtreecommitdiff
path: root/remote.go
diff options
context:
space:
mode:
authorVladimir Buzuev <[email protected]>2020-03-26 14:43:43 -0700
committerVladimir Buzuev <[email protected]>2020-03-26 14:43:43 -0700
commit033ad6e5ef0e0a2b3d58389ef5a1b562b46dcc39 (patch)
tree6ca0163de12706d481460016e9f7006ef6248d2a /remote.go
parent3a2102638d64cd76e50f51577e8bb2b8f9c7035f (diff)
fix SIGSERV on double free for Cred object
Diffstat (limited to 'remote.go')
-rw-r--r--remote.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/remote.go b/remote.go
index c966aab..336388e 100644
--- a/remote.go
+++ b/remote.go
@@ -254,6 +254,8 @@ func credentialsCallback(_cred **C.git_cred, _url *C.char, _username_from_url *C
return C.GIT_EUSER
}
if cred != nil {
+ // we are transferring ownership to libgit, have to disable
+ runtime.SetFinalizer(cred, nil)
*_cred = cred.ptr
}
return 0