forked from mirror/go-sqlcipher
disable extension when loading failed
This commit is contained in:
parent
796dcab06d
commit
1d0b0f0e72
|
@ -31,6 +31,7 @@ func (c *SQLiteConn) loadExtensions(extensions []string) error {
|
|||
defer C.free(unsafe.Pointer(cext))
|
||||
rv = C.sqlite3_load_extension(c.db, cext, nil, nil)
|
||||
if rv != C.SQLITE_OK {
|
||||
C.sqlite3_enable_load_extension(c.db, 0)
|
||||
return errors.New(C.GoString(C.sqlite3_errmsg(c.db)))
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue