Skip to content

Commit

Permalink
Fix frames leak when VfsPoll fails
Browse files Browse the repository at this point in the history
VfsPoll can fail to acquire the WAL write lock, and the caller still
needs to release the frames of the transaction in this case. Restores
the behavior from before the exec_tick rewrite.

Signed-off-by: Cole Miller <[email protected]>
  • Loading branch information
cole-miller committed Oct 17, 2024
1 parent e80eada commit 35a3242
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/leader.c
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ static int exec_apply(struct exec *req)

rv = VfsPoll(vfs, db->path, &frames, &n);
if (rv != 0) {
return rv;
goto finish;

Check warning on line 470 in src/leader.c

View check run for this annotation

Codecov / codecov/patch

src/leader.c#L470

Added line #L470 was not covered by tests
}
sm_move(&req->sm, EXEC_POLLED);
if (n == 0) {
Expand Down

0 comments on commit 35a3242

Please sign in to comment.