Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
disable extension when loading failed
  • Loading branch information
mattn committed Mar 20, 2017
1 parent 796dcab commit 1d0b0f0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions sqlite3_load_extension.go
Expand Up @@ -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)))
}
}
Expand Down

0 comments on commit 1d0b0f0

Please sign in to comment.