Fix double release of the same connection when executing a query.

This commit is contained in:
Madeorsk 2024-11-25 23:23:53 +01:00
parent fc6cbaa2b9
commit 8bc551b55b
Signed by: Madeorsk
GPG key ID: 677E51CA765BB79F

View file

@ -38,7 +38,6 @@ pub fn bindQueryParameter(statement: *pg.Stmt, parameter: _sql.RawQueryParameter
pub fn handlePostgresqlError(err: anyerror, connection: *database.Connection, statement: *pg.Stmt) anyerror {
// Release connection and statement as query failed.
defer statement.deinit();
defer connection.release();
return handleRawPostgresqlError(err, connection.connection);
}