From fa4f7021a162ca5e087d4fd14a55221ca0b6dd8b Mon Sep 17 00:00:00 2001 From: Till Faelligen <2353100+S7evinK@users.noreply.github.com> Date: Mon, 3 Jul 2023 09:04:26 +0200 Subject: [PATCH] Close the stmt after usage --- roomserver/storage/sqlite3/membership_table.go | 1 + 1 file changed, 1 insertion(+) diff --git a/roomserver/storage/sqlite3/membership_table.go b/roomserver/storage/sqlite3/membership_table.go index 834f908d9..4b9c3f6f3 100644 --- a/roomserver/storage/sqlite3/membership_table.go +++ b/roomserver/storage/sqlite3/membership_table.go @@ -312,6 +312,7 @@ func (s *membershipStatements) SelectRoomsWithMembership( if err != nil { return nil, err } + defer internal.CloseAndLogIfError(ctx, stmt, "SelectRoomsWithMembership: stmt.close() failed") params := make([]any, len(userIDs)+1) params[0] = membershipState for i, userID := range userIDs {