summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjinwoo.shin <jw0227.shin@samsung.com>2015-10-08 16:54:47 +0900
committerjinwoo.shin <jw0227.shin@samsung.com>2015-10-08 16:54:47 +0900
commit3a34a2ed9a2eea58d113a11009ca1db985bad770 (patch)
tree0c0e0d9e75cd9fab149e1c15c7c1a1d75ac936ee
parent9f553872614b030b0737b6be0668500e62d584f5 (diff)
downloadair_livetv-3a34a2ed9a2eea58d113a11009ca1db985bad770.tar.gz
air_livetv-3a34a2ed9a2eea58d113a11009ca1db985bad770.tar.bz2
air_livetv-3a34a2ed9a2eea58d113a11009ca1db985bad770.zip
Add tv_service_free_channel_list to fix memory leak
Change-Id: I676be2a2be147bb6c0ec3f37be97203ffd1d5cb9 Signed-off-by: jinwoo.shin <jw0227.shin@samsung.com>
-rw-r--r--src/tv.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/tv.c b/src/tv.c
index 46b0321..689bfed 100644
--- a/src/tv.c
+++ b/src/tv.c
@@ -492,10 +492,11 @@ Eina_List *tv_channel_get_list()
if (channel_info)
channel_list = eina_list_append(channel_list,
channel_info);
- free(tvs_data);
}
}
+ tv_service_free_channel_list(tvs_list);
+
return channel_list;
}
@@ -527,10 +528,11 @@ Eina_List *tv_channel_get_favorite_list()
if (channel_info)
channel_list = eina_list_append(channel_list,
channel_info);
- free(tvs_data);
}
}
+ tv_service_free_channel_list(tvs_list);
+
return channel_list;
}
@@ -632,12 +634,10 @@ Eina_List *tv_channel_search_by_number(long major, long minor)
if (channel_info)
channel_list = eina_list_append(channel_list,
channel_info);
- free(tvs_data);
}
free:
- if (tvs_list)
- g_list_free(tvs_list);
+ tv_service_free_channel_list(tvs_list);
g_list_foreach(filter, (GFunc) _tv_channel_free_filter, NULL);
g_list_free(filter);
@@ -830,8 +830,7 @@ int tv_channel_direct_tune(long major, long minor)
if (r == TVS_ERROR_OK)
g_tv_info.viewing_locked_channel = -1;
- g_list_foreach(tvs_list, (GFunc) g_free, NULL);
- g_list_free(tvs_list);
+ tv_service_free_channel_list(tvs_list);
free:
g_list_foreach(filter, (GFunc) _tv_channel_free_filter, NULL);