From b168e4c42517e50508ff48e241bda56366c46375 Mon Sep 17 00:00:00 2001 From: Joan Fontanals Date: Tue, 26 Sep 2023 12:03:18 +0200 Subject: [PATCH] fix(consensus): free more cstrings (#6056) Signed-off-by: Joan Fontanals Martinez --- jina/serve/consensus/run.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/jina/serve/consensus/run.go b/jina/serve/consensus/run.go index 9e4c0880b7ddb..e14db997a0c15 100644 --- a/jina/serve/consensus/run.go +++ b/jina/serve/consensus/run.go @@ -316,6 +316,8 @@ func run(self *C.PyObject, args *C.PyObject, kwargs *C.PyObject) *C.PyObject { SnapshotThreshold = C.uint64_t(raftDefaultConfig.SnapshotThreshold) LeaderLeaseTimeout = C.int(raftDefaultConfig.LeaderLeaseTimeout / time.Millisecond) LogLevel = C.CString(raftDefaultConfig.LogLevel) + defer C.free(unsafe.Pointer(LogLevel)) + NoSnapshotRestoreOnStart = C.bool(raftDefaultConfig.NoSnapshotRestoreOnStart) if C.PyArg_ParseTuple_run(args,