From 5533009c90b836db1bcc0ca11832059590bc7c63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Andr=C3=A9=20Santoni?= Date: Mon, 1 Aug 2022 10:45:17 +0200 Subject: [PATCH] Fix memory leak --- libretro/libretro.go | 1 + 1 file changed, 1 insertion(+) diff --git a/libretro/libretro.go b/libretro/libretro.go index d9751e2c..33708efd 100644 --- a/libretro/libretro.go +++ b/libretro/libretro.go @@ -572,6 +572,7 @@ func (core *Core) Serialize(size uint) ([]byte, error) { return nil, errors.New("retro_serialize failed") } bytes := C.GoBytes(data, C.int(size)) + C.free(data) return bytes, nil }