Skip to content

Commit

Permalink
sqlite: fix missing Commit() in RemovePodContainers()
Browse files Browse the repository at this point in the history
We have to Commit() the transaction. Note this is only in a rare pod
remove code path and very unlikely to ever be used.

[NO NEW TESTS NEEDED]

Signed-off-by: Paul Holzinger <[email protected]>
  • Loading branch information
Luap99 committed Nov 30, 2023
1 parent 429080f commit 1e5a133
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions libpod/sqlite_state.go
Original file line number Diff line number Diff line change
Expand Up @@ -1702,6 +1702,10 @@ func (s *SQLiteState) RemovePodContainers(pod *Pod) (defErr error) {
return err
}

if err := tx.Commit(); err != nil {
return fmt.Errorf("committing pod containers %s removal transaction: %w", pod.ID(), err)
}

return nil
}

Expand Down

0 comments on commit 1e5a133

Please sign in to comment.