From 1d0b0f0e72ef499134007487ec04768b6ba2bd6b Mon Sep 17 00:00:00 2001 From: Yasuhiro Matsumoto Date: Tue, 21 Mar 2017 00:47:07 +0900 Subject: [PATCH] disable extension when loading failed --- sqlite3_load_extension.go | 1 + 1 file changed, 1 insertion(+) diff --git a/sqlite3_load_extension.go b/sqlite3_load_extension.go index b5bccb1..bb7e25f 100644 --- a/sqlite3_load_extension.go +++ b/sqlite3_load_extension.go @@ -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))) } }