Add LockOSThread
This commit is contained in:
parent
58e0a0f357
commit
0476e7d58f
|
@ -516,6 +516,9 @@ func ReferenceNormalizeName(name string, flags ReferenceFormat) (string, error)
|
||||||
buf := (*C.char)(C.malloc(bufSize))
|
buf := (*C.char)(C.malloc(bufSize))
|
||||||
defer C.free(unsafe.Pointer(buf))
|
defer C.free(unsafe.Pointer(buf))
|
||||||
|
|
||||||
|
runtime.LockOSThread()
|
||||||
|
defer runtime.UnlockOSThread()
|
||||||
|
|
||||||
ecode := C.git_reference_normalize_name(buf, bufSize, cname, C.uint(flags))
|
ecode := C.git_reference_normalize_name(buf, bufSize, cname, C.uint(flags))
|
||||||
if ecode < 0 {
|
if ecode < 0 {
|
||||||
return "", MakeGitError(ecode)
|
return "", MakeGitError(ecode)
|
||||||
|
|
Loading…
Reference in New Issue