From e26f677b16632e4bf8ae76abcd6859e70d0430ca Mon Sep 17 00:00:00 2001 From: Paul Holzinger Date: Tue, 28 Nov 2023 14:22:18 +0100 Subject: [PATCH] sqlite: fix missing Commit() in RemovePodContainers() 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 --- libpod/sqlite_state.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libpod/sqlite_state.go b/libpod/sqlite_state.go index cdd0d25c88..d63cb2561e 100644 --- a/libpod/sqlite_state.go +++ b/libpod/sqlite_state.go @@ -1697,6 +1697,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 }