Skip to content

Commit

Permalink
Fix memory leak
Browse files Browse the repository at this point in the history
  • Loading branch information
kivutar committed Aug 1, 2022
1 parent 500c8ba commit 5533009
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions libretro/libretro.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 5533009

Please sign in to comment.