Adds a fuzz target (#908)

* Adds a fuzz target

* Fixes memory leak
This commit is contained in:
Catena cyber
2021-02-15 14:57:26 +01:00
committed by GitHub
parent 3cbdae750e
commit 16175c1389
2 changed files with 31 additions and 1 deletions

View File

@@ -1676,7 +1676,7 @@ func (d *SQLiteDriver) Open(dsn string) (driver.Conn, error) {
//
// Because default is NORMAL this statement is always executed
if err := exec(fmt.Sprintf("PRAGMA synchronous = %s;", synchronousMode)); err != nil {
C.sqlite3_close_v2(db)
conn.Close()
return nil, err
}