more_option: fix svace issue 71/137971/3
authorJinYong Park <j4939.park@samsung.com>
Mon, 10 Jul 2017 12:06:59 +0000 (21:06 +0900)
committerJaehyun Cho <jae_hyun.cho@samsung.com>
Tue, 11 Jul 2017 02:48:39 +0000 (02:48 +0000)
Change-Id: I1dee669e3775a184b96638607647b0546d874846
Signed-off-by: Jinyong Park <j4939.park@samsung.com>
src/wearable/efl_extension_more_option.c

index 6345631a43b78549a3d0ba75e583d38494741a44..66c22d332f12c7d91faeaa1396581cf7db20b67d 100644 (file)
@@ -76,19 +76,14 @@ _panel_active_cb(void *data, Evas_Object *obj, const char *emission, const char
         eext_rotary_object_event_activated_set(mold->rotary_selector, EINA_TRUE);
         eext_object_event_callback_add(obj, EEXT_CALLBACK_BACK, _drawer_back_cb, mold);
 
-        Edje_Message_Int_Set *msg = malloc(sizeof(Edje_Message_Int_Set));
-        if (!msg) return;
-
-        msg->count = 1;
-        msg->val[0] = 0;
+        Edje_Message_Int msg;
+        msg.val = 0;
 
         Evas_Object* content_part = elm_object_part_content_get(mold->rotary_selector, "content");
         if (content_part)
           {
-             edje_object_message_send(elm_layout_edje_get(content_part), EDJE_MESSAGE_INT_SET, 0, msg);
+             edje_object_message_send(elm_layout_edje_get(content_part), EDJE_MESSAGE_INT, 0, &msg);
           }
-        else
-          free(msg);
         //for accessibility
         // signal send to rotary selector for highlighted access object
         if(elm_atspi_bridge_utils_is_screen_reader_enabled())
@@ -110,19 +105,14 @@ _panel_inactive_cb(void *data, Evas_Object *obj, const char *emission, const cha
         evas_object_smart_callback_call(mold->more_option, "more,option,closed", NULL);
         eext_rotary_object_event_activated_set(mold->rotary_selector, EINA_FALSE);
 
-        Edje_Message_Int_Set *msg = malloc(sizeof(Edje_Message_Int_Set));
-        if (!msg) return;
-
-        msg->count = 1;
-        msg->val[0] = 1;
+        Edje_Message_Int msg;
+        msg.val = 1;
 
         Evas_Object* content_part = elm_object_part_content_get(mold->rotary_selector, "content");
         if (content_part)
           {
-             edje_object_message_send(elm_layout_edje_get(content_part), EDJE_MESSAGE_INT_SET, 0, msg);
+             edje_object_message_send(elm_layout_edje_get(content_part), EDJE_MESSAGE_INT, 0, &msg);
           }
-        else
-          free(msg);
 
         //item index is initialized as zero.
         if (mold->rotary_selector)