diff --git a/roomserver/storage/redactions_table.go b/roomserver/storage/redactions_table.go index f09c13fe0..1d0d4becd 100644 --- a/roomserver/storage/redactions_table.go +++ b/roomserver/storage/redactions_table.go @@ -99,7 +99,7 @@ func (s *redactionStatements) bulkSelectRedaction( if err != nil { return nil, nil, err } - defer func() { err = rows.Close() }() + defer rows.Close() // nolint: errcheck validated = make(map[string]types.EventNID) unvalidated = make(map[string]types.EventNID) diff --git a/syncapi/storage/redactions_table.go b/syncapi/storage/redactions_table.go index 452a9651e..60430a442 100644 --- a/syncapi/storage/redactions_table.go +++ b/syncapi/storage/redactions_table.go @@ -102,7 +102,7 @@ func (s *redactionStatements) bulkSelectRedaction( if err != nil { return nil, nil, err } - defer func() { err = rows.Close() }() + defer rows.Close() // nolint: errcheck validated = make(redactedToRedactionMap) unvalidated = make(redactedToRedactionMap)