fix memory leak

Signed-off-by: wangben <wangben15@huawei.com>
This commit is contained in:
wangben
2022-03-12 13:49:53 +08:00
parent 64edb3ea17
commit efd6579b59
+1 -1
View File
@@ -238,7 +238,7 @@ namespace OHOS::Js_sys_module::Process {
HILOG_ERROR("napi_create_reference is failed");
return;
}
if (temp.empty()) {
if (!temp.empty()) {
size_t pos = events.find(temp);
if (pos == std::string::npos) {
HILOG_ERROR("illegal event");