Skip to content

Commit 699ab1d

Browse files
committed
Patch
- Closing file in case of any exception
1 parent 8672f0b commit 699ab1d

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

cpp/react-native-quick-sqlite.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,7 @@ void installSequel(jsi::Runtime &rt, const char *docPath)
221221
res.setProperty(rt, "commands", jsi::Value(commands));
222222
return move(res);
223223
} catch (...) {
224+
sqFile.close();
224225
sequel_execute_literal_update(dbName, "ROLLBACK");
225226
jsi::detail::throwJSError(rt, "Unexpected error, transaction was rolledback");
226227
return {};

0 commit comments

Comments
 (0)