Fix double free 15/215815/1
authorHwankyu Jhun <h.jhun@samsung.com>
Wed, 16 Oct 2019 07:23:35 +0000 (16:23 +0900)
committerHwankyu Jhun <h.jhun@samsung.com>
Wed, 16 Oct 2019 07:23:35 +0000 (16:23 +0900)
Change-Id: If5aefb0773db87575bd160f0d8cd164a6aed375b
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
component_based/base/action_internal.cc

index 779da66c12bc58f16afbc2d69939ec652e505b88..363a92af3eda13a1f78baf231306b1a73ff15c84 100644 (file)
@@ -42,7 +42,10 @@ void Action::OnActionCB(const char* action, app_control_h app_control,
                         void* user_data) {
   IEventListener* ev = static_cast<IEventListener*>(user_data);
   try {
-    ev->OnAction(std::string(action), AppControl(app_control));
+    app_control_h clone = nullptr;
+    app_control_clone(&clone, app_control);
+
+    ev->OnAction(std::string(action), AppControl(clone));
   } catch(Exception& ex) {
     LOGE("Exception occurred (%s)", ex.what());
   }