fix manual memory management error, updates #53

This commit is contained in:
Jan Mercl
2021-05-06 12:04:30 +02:00
parent a740e9e176
commit 7de07c7a26

View File

@@ -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)