Fix read of invalid (already freed) memory.

This commit is contained in:
John Gallagher 2012-10-15 20:57:32 -04:00
parent b9ff6f3fd3
commit a76fd8f336
1 changed files with 1 additions and 1 deletions

View File

@ -108,7 +108,7 @@ func (c *SQLiteConn) Close() error {
s := C.sqlite3_next_stmt(c.db, nil) s := C.sqlite3_next_stmt(c.db, nil)
for s != nil { for s != nil {
C.sqlite3_finalize(s) C.sqlite3_finalize(s)
s = C.sqlite3_next_stmt(c.db, s) s = C.sqlite3_next_stmt(c.db, nil)
} }
rv := C.sqlite3_close(c.db) rv := C.sqlite3_close(c.db)
if rv != C.SQLITE_OK { if rv != C.SQLITE_OK {