Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 49cd21c

Browse files
committed
FlTextInputPlugin: fix memory leaks
1 parent 1c01f8d commit 49cd21c

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

shell/platform/linux/fl_text_input_plugin.cc

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -184,12 +184,11 @@ static FlMethodResponse* set_client(FlTextInputPlugin* self, FlValue* args) {
184184
// Clear the multiline flag, then set it only if the field is multiline.
185185
self->input_multiline = FALSE;
186186
FlValue* input_type_value =
187-
fl_value_lookup(config_value, fl_value_new_string(kTextInputTypeKey));
187+
fl_value_lookup_string(config_value, kTextInputTypeKey);
188188
if (fl_value_get_type(input_type_value) == FL_VALUE_TYPE_MAP) {
189-
FlValue* input_type_name = fl_value_lookup(
190-
input_type_value, fl_value_new_string(kTextInputTypeNameKey));
191-
if (fl_value_equal(input_type_name,
192-
fl_value_new_string(kMultilineInputType))) {
189+
FlValue* input_type_name = fl_value_lookup_string(
190+
input_type_value, kTextInputTypeNameKey);
191+
if (fl_value_equal_string(input_type_name, kMultilineInputType)) {
193192
self->input_multiline = TRUE;
194193
}
195194
}

0 commit comments

Comments
 (0)