Fix memory leak in Withsignature

This commit is contained in:
Michael Boulton 2020-08-14 15:41:17 +01:00
parent 6f71ba98e0
commit 3ba68ac003
No known key found for this signature in database
GPG Key ID: 8A62CA0BE2E0197E
1 changed files with 1 additions and 0 deletions

View File

@ -73,6 +73,7 @@ func (c *Commit) WithSignature(signature string, signatureField string) (*Oid, e
var csf *C.char = nil
if signatureField != "" {
csf = C.CString(signatureField)
defer C.free(unsafe.Pointer(csf))
}
runtime.LockOSThread()