aboutsummaryrefslogtreecommitdiff
path: root/src/javascript
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <jarred@jarredsumner.com> 2022-05-16 18:45:46 -0700
committerGravatar Jarred Sumner <jarred@jarredsumner.com> 2022-05-16 18:45:46 -0700
commitba36f5db7e69640140f204544f65084277fc3a17 (patch)
tree7583f5567f3c9c171596a3d11391f9cef992c689 /src/javascript
parenta372a0dd6d28192cd4b77b0dd8cc7580646ec790 (diff)
downloadbun-ba36f5db7e69640140f204544f65084277fc3a17.tar.gz
bun-ba36f5db7e69640140f204544f65084277fc3a17.tar.zst
bun-ba36f5db7e69640140f204544f65084277fc3a17.zip
prepare for release
Diffstat (limited to 'src/javascript')
-rw-r--r--src/javascript/jsc/bindings/sqlite/JSSQLStatement.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/javascript/jsc/bindings/sqlite/JSSQLStatement.cpp b/src/javascript/jsc/bindings/sqlite/JSSQLStatement.cpp
index 4a56eb2be..c19b736e5 100644
--- a/src/javascript/jsc/bindings/sqlite/JSSQLStatement.cpp
+++ b/src/javascript/jsc/bindings/sqlite/JSSQLStatement.cpp
@@ -257,7 +257,10 @@ static JSC::JSValue rebindObject(JSC::JSGlobalObject* globalObject, JSC::JSValue
else
value = target->get(globalObject, propertyName);
- int index = sqlite3_bind_parameter_index(stmt, WTF::String(propertyName.string()).utf8().data());
+ // Ensure this gets freed on scope clear
+ auto utf8 = WTF::String(propertyName.string()).utf8();
+
+ int index = sqlite3_bind_parameter_index(stmt, utf8.data());
if (index == 0) {
throwException(globalObject, scope, createError(globalObject, "Unknown parameter \"" + propertyName.string() + "\""_s));
return JSValue();