Skip to content

Commit

Permalink
fix: Free result
Browse files Browse the repository at this point in the history
  • Loading branch information
jcs090218 committed Mar 7, 2024
1 parent 47b2ccb commit 7d82fee
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/flx.c
Original file line number Diff line number Diff line change
Expand Up @@ -575,4 +575,5 @@ void flx_free(flx_result* result) {
return;
}
arrfree(result->indices);
free(result);
}
2 changes: 1 addition & 1 deletion test/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ int main(int argc, char* argv[]) {
printf("Score: %d\n", result->score);

for (int i = 0; i < arrlen(result->indices); ++i) {
printf("idicies: %d %d\n", i, (*result).indices[i]);
printf("(%d) idicies: %d\n", i, (*result).indices[i]);
}

flx_free(result);
Expand Down

0 comments on commit 7d82fee

Please sign in to comment.