diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/javascript/jsc/bindings/sqlite/JSSQLStatement.cpp | 5 |
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(); |