mirror of https://github.com/mattn/go-sqlite3.git
Fixed double free when closing SQLiteStmt
Rows should not close the statement because Stmt has its own close function. This caused a double free error/crash on Fedora 16 x86_64.
This commit is contained in:
parent
e0e34d2bf7
commit
d64145383b
|
@ -228,10 +228,6 @@ type SQLiteRows struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (rc *SQLiteRows) Close() error {
|
func (rc *SQLiteRows) Close() error {
|
||||||
rv := C.sqlite3_finalize(rc.s.s)
|
|
||||||
if rv != C.SQLITE_OK {
|
|
||||||
return errors.New(C.GoString(C.sqlite3_errmsg(rc.s.c.db)))
|
|
||||||
}
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue