powerkey : change to fix memory leak 19/113819/1 accepted/tizen/3.0/common/20170210.071242 accepted/tizen/3.0/mobile/20170210.001926 accepted/tizen/3.0/tv/20170210.001948 accepted/tizen/3.0/wearable/20170210.002004 submit/tizen_3.0/20170209.082223
authorlokilee73 <changjoo.lee@samsung.com>
Thu, 9 Feb 2017 02:52:37 +0000 (11:52 +0900)
committerlokilee73 <changjoo.lee@samsung.com>
Thu, 9 Feb 2017 02:52:44 +0000 (11:52 +0900)
Change-Id: If9ceb459ab2a3e78766630a2811fd5b3a5360f05
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
src/powerkey/powerkey-mobile.c

index e8068c5..5ff7bc0 100755 (executable)
@@ -201,7 +201,7 @@ Eina_Bool KeyUpCb(void *data, int type, void *event)
 
 int powerkey_list(bundle *b, const struct popup_ops *ops)
 {
-       Elm_Genlist_Item_Class *itc = elm_genlist_item_class_new();
+       Elm_Genlist_Item_Class *itc;
        Evas_Object *popup = NULL;
        Evas_Object *box = NULL;
        Evas_Object *genlist = NULL;
@@ -243,6 +243,7 @@ int powerkey_list(bundle *b, const struct popup_ops *ops)
        evas_object_size_hint_weight_set(genlist, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
        evas_object_size_hint_align_set(genlist, EVAS_HINT_FILL, EVAS_HINT_FILL);
 
+       itc = elm_genlist_item_class_new();
        itc->item_style = "type1";
        itc->func.text_get = gl_text_get_cb;
        itc->func.content_get = gl_image_get_cb;