Commit e81ee297 authored by gwenn's avatar gwenn

Fix Stmt.finalize to avoid double free.

parent 3940be47
......@@ -1149,11 +1149,11 @@ func (s *Stmt) finalize() error {
return errors.New("sqlite statement with already closed database connection")
}
rv := C.sqlite3_finalize(s.stmt)
s.stmt = nil
if rv != C.SQLITE_OK {
Log(int32(rv), "error while finalizing Stmt")
return s.error(rv, "Stmt.finalize")
}
s.stmt = nil
return nil
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment