We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3c14acf commit 86127c0Copy full SHA for 86127c0
src/node_sqlite.cc
@@ -1823,6 +1823,9 @@ void DatabaseSync::Deserialize(const FunctionCallbackInfo<Value>& args) {
1823
}
1824
1825
1826
+ // sqlite3_malloc64 is required because SQLITE_DESERIALIZE_FREEONCLOSE
1827
+ // transfers ownership to SQLite, which calls sqlite3_free() on close.
1828
+ // See: https://www.sqlite.org/c3ref/deserialize.html
1829
unsigned char* buf =
1830
static_cast<unsigned char*>(sqlite3_malloc64(byte_length));
1831
if (buf == nullptr) {
0 commit comments