Fixing SVACE Issues 42/315842/2
authorshayh <yuhong.sha@samsung.com>
Thu, 5 Dec 2024 14:37:57 +0000 (22:37 +0800)
committerBot Blink <blinkbot@samsung.com>
Fri, 6 Dec 2024 02:58:15 +0000 (02:58 +0000)
The patch is to add protection code for WGID:2282441,228763

Change-Id: I88e8b853b7cf6b7179a29d6a3ea8e915eeeaf8fd
Signed-off-by: shayh <yuhong.sha@samsung.com>
tizen_src/chromium_impl/base/tizen/resource_manager.cc
tizen_src/chromium_impl/media/base/efl/media_player_util_efl.cc
wrt/src/browser/wrt_web_contents.cc

index bd1b741490855debebad0b8e6014543be17bf2c7..59d9820b44af92e0a42023dd61ec5fa4790ec2b7 100644 (file)
@@ -334,6 +334,7 @@ bool ResourceManager::IsCategorySupported(int category) {
       rm_get_resource_list(static_cast<rm_rsc_category_e>(category), &list);
   if (ret != RM_OK) {
     TIZEN_MEDIA_LOG(ERROR) << "Cannot obtain resource list";
+    rm_free_resource_list(list);
     return false;
   }
   const auto count = rm_resource_list_get_count(list);
index 95ad6c47fe6a2c078126bba221bccff78938f041..d5a318f9fe3ada142d27ab113e9cdecd0d40f60b 100644 (file)
@@ -413,6 +413,7 @@ int GetScalerCount() {
   rm_resource_list_h list;
   if (rm_get_resource_list(RM_CATEGORY_SCALER_PROGRESSIVE, &list) != RM_OK) {
     LOG(INFO) << "rm_get_resource_list failed";
+    rm_free_resource_list(list);
     return count;
   }
 
index 0b40d3ed53a678ee3e2c9d15afe1d9cb88642f1c..d73c3d5071c05a0cde78d82f36c26a518858d79d 100644 (file)
@@ -320,7 +320,10 @@ void WRTWebContents::DidFinishLoad(content::RenderFrameHost* render_frame_host,
       meta_data_info.GetValue(kKeyRouterLongPress) == "true") {
     LOG(INFO) << "enable.default.focus.view is true or keyrouter.long.press is "
                  "true!!";
-    rwhva()->MarkAsDefaultFocusedView();
+
+    auto view = rwhva();
+    if (view)
+      view->MarkAsDefaultFocusedView();
   }
 #endif
 }