malloc replaced by ELM_NEW in popup.
authorshilpa singh <shilpa.singh@samsung.com>
Tue, 24 Aug 2010 07:07:54 +0000 (16:07 +0900)
committershilpa singh <shilpa.singh@samsung.com>
Tue, 24 Aug 2010 07:07:54 +0000 (16:07 +0900)
src/lib/elm_popup.c

index 3c94d45..b4841b1 100644 (file)
@@ -250,7 +250,8 @@ _resize_parent(void *data, Evas *e, Evas_Object *obj, void *event_info)
 static void \r
 _action_area_clicked( void *data, Evas_Object *obj, void *event_info )\r
 {\r
-   Action_Area_Data *adata = (Action_Area_Data *)data;\r
+   Action_Area_Data *adata = NULL;\r
+   adata = (Action_Area_Data *)data;\r
    \r
    if (!adata) return;  \r
    evas_object_smart_callback_call(adata->obj, "response", (void *)adata->response_id);   \r
@@ -265,7 +266,7 @@ _elm_popup_add_button(Evas_Object *obj, const char *text, int response_id)
    Evas_Object *btn;\r
    \r
    if (!wd) return NULL;\r
-   Action_Area_Data *adata = malloc(sizeof(Action_Area_Data)); \r
+   Action_Area_Data *adata = ELM_NEW(sizeof(Action_Area_Data)); \r
    btn = elm_button_add(obj);\r
    snprintf(buf, sizeof(buf), "popup_button/%s", elm_widget_style_get(obj));\r
    elm_object_style_set(btn, buf);\r