Skip to content

Commit aeb9623

Browse files
Fix leak on error case (#185516)
Fix leak of GTask if platform message sent when engine not started. Unlikely to occur and would not be a major issue in this case.
1 parent 9a3adde commit aeb9623

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

engine/src/flutter/shell/platform/linux/fl_engine.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1086,6 +1086,7 @@ void fl_engine_send_platform_message(FlEngine* self,
10861086
if (self->engine == nullptr) {
10871087
g_task_return_new_error(task, fl_engine_error_quark(),
10881088
FL_ENGINE_ERROR_FAILED, "No engine to send to");
1089+
g_object_unref(task);
10891090
return;
10901091
}
10911092

0 commit comments

Comments
 (0)