Add support for creating signed commits and signing commits during a rebase #626

Merged
mbfr merged 25 commits from master into master 2020-08-18 11:25:31 -05:00
1 changed files with 1 additions and 0 deletions
Showing only changes of commit 3ba68ac003 - Show all commits

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))
lhchavez commented 2020-08-14 08:41:25 -05:00 (Migrated from github.com)
Review

since C.CString() makes a copy, this needs a defer C.free(unsafe.Pointer(csf)) to avoid a memory leak: https://blog.golang.org/cgo#TOC_2.

since `C.CString()` makes a copy, this needs a `defer C.free(unsafe.Pointer(csf))` to avoid a memory leak: https://blog.golang.org/cgo#TOC_2.
mbfr commented 2020-08-14 09:50:05 -05:00 (Migrated from github.com)
Review

Added

Added
}
runtime.LockOSThread()