Skip to content
This repository was archived by the owner on Aug 10, 2022. It is now read-only.

Commit 040a1b4

Browse files
M-Quadrahush-hush
authored andcommitted
fix Py_EnterRecursiveCall C.free sequence
1 parent 03d93fb commit 040a1b4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

recursion.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import (
2020
//Py_EnterRecursiveCall : https://docs.python.org/3/c-api/exceptions.html#c.Py_EnterRecursiveCall
2121
func Py_EnterRecursiveCall(where string) int {
2222
cwhere := C.CString(where)
23-
C.free(unsafe.Pointer(cwhere))
23+
defer C.free(unsafe.Pointer(cwhere))
2424

2525
return int(C._go_Py_EnterRecursiveCall(cwhere))
2626
}

0 commit comments

Comments
 (0)