diff options
author | Yasuhiro Matsumoto <mattn.jp@gmail.com> | 2017-01-07 22:22:02 +0900 |
---|---|---|
committer | Yasuhiro Matsumoto <mattn.jp@gmail.com> | 2017-01-07 22:22:02 +0900 |
commit | a554cf198fe0b1a80f528fec6f892b60b7004da5 (patch) | |
tree | 32dd69c1d973646af6179eb50e6f659e8dc7de76 | |
parent | fix race condition (diff) | |
download | golite-a554cf198fe0b1a80f528fec6f892b60b7004da5.tar.gz golite-a554cf198fe0b1a80f528fec6f892b60b7004da5.tar.xz |
close statement
-rw-r--r-- | sqlite3.go | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -429,6 +429,7 @@ func (c *SQLiteConn) exec(ctx context.Context, query string, args []namedValue) if s.(*SQLiteStmt).s != nil { na := s.NumInput() if len(args) < na { + s.Close() return nil, fmt.Errorf("Not enough args to execute query. Expected %d, got %d.", na, len(args)) } for i := 0; i < na; i++ { |