diff options
Diffstat (limited to 'vendor/github.com/ncruces/go-sqlite3/internal/alloc')
-rw-r--r-- | vendor/github.com/ncruces/go-sqlite3/internal/alloc/alloc_unix.go | 2 | ||||
-rw-r--r-- | vendor/github.com/ncruces/go-sqlite3/internal/alloc/alloc_windows.go | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/vendor/github.com/ncruces/go-sqlite3/internal/alloc/alloc_unix.go b/vendor/github.com/ncruces/go-sqlite3/internal/alloc/alloc_unix.go index 009cc1f0b..c05cfa735 100644 --- a/vendor/github.com/ncruces/go-sqlite3/internal/alloc/alloc_unix.go +++ b/vendor/github.com/ncruces/go-sqlite3/internal/alloc/alloc_unix.go @@ -47,7 +47,7 @@ func (m *mmappedMemory) Reallocate(size uint64) []byte { // Commit additional memory up to new bytes. err := unix.Mprotect(m.buf[com:new], unix.PROT_READ|unix.PROT_WRITE) if err != nil { - panic(err) + return nil } // Update committed memory. diff --git a/vendor/github.com/ncruces/go-sqlite3/internal/alloc/alloc_windows.go b/vendor/github.com/ncruces/go-sqlite3/internal/alloc/alloc_windows.go index 62d499649..46181b118 100644 --- a/vendor/github.com/ncruces/go-sqlite3/internal/alloc/alloc_windows.go +++ b/vendor/github.com/ncruces/go-sqlite3/internal/alloc/alloc_windows.go @@ -56,7 +56,7 @@ func (m *virtualMemory) Reallocate(size uint64) []byte { // Commit additional memory up to new bytes. _, err := windows.VirtualAlloc(m.addr, uintptr(new), windows.MEM_COMMIT, windows.PAGE_READWRITE) if err != nil { - panic(err) + return nil } // Update committed memory. |