Skip to content

Commit

Permalink
Make sure to free the refcount
Browse files Browse the repository at this point in the history
  • Loading branch information
camc committed Jan 31, 2023
1 parent 5d1b66c commit 2e0b9de
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
![](screenshot.png)

## Installation
Binaries are available for [Linux](https://github.com/camc/chess/releases/download/v0/game-build-linux-amd64.zip) and [Windows](https://github.com/camc/chess/releases/download/v0/game-build-windows-amd64.zip).
Binaries are available for [Linux and Windows](https://github.com/camc/chess/releases/latest).

## Building

Expand Down
1 change: 1 addition & 0 deletions src/engine.c
Original file line number Diff line number Diff line change
Expand Up @@ -579,6 +579,7 @@ static bool movegen_task(struct MovegenTaskArg *arg) {
negamax_from_root(arg->state, arg->depth, arg->start_time);

if (acnt_dec(arg->refcount)) {
free(arg->refcount);
free(arg->state);
free(arg->legal_moves);
}
Expand Down

0 comments on commit 2e0b9de

Please sign in to comment.