From 8bc551b55b1af10e16eacb8ea50ea8640e643bfc Mon Sep 17 00:00:00 2001 From: Madeorsk Date: Mon, 25 Nov 2024 23:23:53 +0100 Subject: [PATCH] Fix double release of the same connection when executing a query. --- src/postgresql.zig | 1 - 1 file changed, 1 deletion(-) diff --git a/src/postgresql.zig b/src/postgresql.zig index cb72c80..23e0ffc 100644 --- a/src/postgresql.zig +++ b/src/postgresql.zig @@ -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); }