From 7de07c7a267bd3641228f6e47795071b839c4520 Mon Sep 17 00:00:00 2001 From: Jan Mercl <0xjnml@gmail.com> Date: Thu, 6 May 2021 12:04:30 +0200 Subject: [PATCH] fix manual memory management error, updates #53 --- sqlite.go | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/sqlite.go b/sqlite.go index 37fde4f..a3a0f12 100644 --- a/sqlite.go +++ b/sqlite.go @@ -604,14 +604,9 @@ func (s *stmt) query(ctx context.Context, args []driver.NamedValue) (r driver.Ro } if n != 0 { - a, err := s.c.bind(pstmt, n, args) - if err != nil { + if allocs, err = s.c.bind(pstmt, n, args); err != nil { return err } - - if len(a) != 0 { - allocs = append(allocs, a...) - } } rc, err := s.c.step(pstmt)