Fix self verified prevent issues 14/49414/1 accepted/tizen/tv/20151014.043251 submit/tizen/20151014.005748
authorjinwoo.shin <jw0227.shin@samsung.com>
Tue, 13 Oct 2015 05:42:34 +0000 (14:42 +0900)
committerjinwoo.shin <jw0227.shin@samsung.com>
Tue, 13 Oct 2015 05:42:34 +0000 (14:42 +0900)
Change-Id: Ib50dcc59575dc22b41a51ac8924882d6ca451fd2
Signed-off-by: jinwoo.shin <jw0227.shin@samsung.com>
src/layout_channelinfo_list.c
src/tv.c

index e2b3187..d690586 100644 (file)
@@ -66,6 +66,8 @@ static int _set_next_channel(struct _priv *priv, int order)
 
                        return -1;
                }
+
+               priv->channel_info = current;
        }
 
        channel_list = tv_channel_get_list();
@@ -153,11 +155,13 @@ static void _draw_channel_info(Evas_Object *box,
                return;
        }
 
+       prev = NULL;
+       next = NULL;
        if (!_get_next_channel(current, &prev, &next) ||
                        !prev || !next) {
                _ERR("failed to get next channel");
 
-               return;
+               goto err;
        }
 
        elm_box_clear(box);
@@ -174,6 +178,7 @@ static void _draw_channel_info(Evas_Object *box,
        util_draw_channel_info(layout, prev);
        elm_box_pack_end(box, layout);
 
+err:
        tv_channel_del_info(prev);
        tv_channel_del_info(next);
 }
@@ -191,6 +196,8 @@ static void _update_channel_info(struct _priv *priv)
 
                        return;
                }
+
+               priv->channel_info = current;
        }
 
        if (!_get_next_channel(current, &prev, &next)) {
index 689bfed..054892a 100644 (file)
--- a/src/tv.c
+++ b/src/tv.c
@@ -344,7 +344,6 @@ int tv_epg_get_program(int service_id, struct tv_program_request *request)
                        (TvServiceEpgCallback) _tv_epg_event_cb, request);
        if (r != TVS_ERROR_OK) {
                _ERR("failed to get epg get current program : %d", service_id);
-               free(request);
                return -1;
        }