From c8e220334d2cff853bbea0813075e3241b19f6a8 Mon Sep 17 00:00:00 2001 From: Alex P Date: Wed, 1 Oct 2025 22:58:37 +0300 Subject: [PATCH] [WIP] Updates: reduce PR complexity --- internal/native/cgo_linux.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/internal/native/cgo_linux.go b/internal/native/cgo_linux.go index c725b6aa..77b7d74f 100644 --- a/internal/native/cgo_linux.go +++ b/internal/native/cgo_linux.go @@ -118,6 +118,8 @@ func uiInit(rotation uint16) { defer cgoLock.Unlock() cRotation := C.u_int16_t(rotation) + defer C.free(unsafe.Pointer(&cRotation)) + C.jetkvm_ui_init(cRotation) } @@ -348,6 +350,8 @@ func uiDispSetRotation(rotation uint16) (bool, error) { nativeLogger.Info().Uint16("rotation", rotation).Msg("setting rotation") cRotation := C.u_int16_t(rotation) + defer C.free(unsafe.Pointer(&cRotation)) + C.jetkvm_ui_set_rotation(cRotation) return true, nil }