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 }