From d43ddb14c6a940553168a2741d11d6817f1cf98f Mon Sep 17 00:00:00 2001 From: "jinwoo.shin" Date: Tue, 13 Oct 2015 14:42:34 +0900 Subject: [PATCH] Fix self verified prevent issues Change-Id: Ib50dcc59575dc22b41a51ac8924882d6ca451fd2 Signed-off-by: jinwoo.shin --- src/layout_channelinfo_list.c | 9 ++++++++- src/tv.c | 1 - 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/layout_channelinfo_list.c b/src/layout_channelinfo_list.c index e2b3187..d690586 100644 --- a/src/layout_channelinfo_list.c +++ b/src/layout_channelinfo_list.c @@ -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)) { diff --git a/src/tv.c b/src/tv.c index 689bfed..054892a 100644 --- 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; } -- 2.7.4