| commit | 6cc847b133a1e506062737a7e7b9fae22d821c16 | [log] [tgz] |
|---|---|---|
| author | Yasuhiro Matsumoto <[email protected]> | Fri Oct 04 14:52:25 2024 |
| committer | Yasuhiro Matsumoto <[email protected]> | Fri Oct 04 14:52:25 2024 |
| tree | 5af1aca8b53903c00b191a1243de074c5916e8de | |
| parent | 846fea6c1443e8cc366fc1966fe078d7f825f6a9 [diff] |
close statement when missing query arguments fixes #1280
diff --git a/sqlite3.go b/sqlite3.go index ed2a9e2..ce985ec 100644 --- a/sqlite3.go +++ b/sqlite3.go
@@ -929,6 +929,7 @@ s.(*SQLiteStmt).cls = true na := s.NumInput() if len(args)-start < na { + s.Close() return nil, fmt.Errorf("not enough args to execute query: want %d got %d", na, len(args)-start) } // consume the number of arguments used in the current