Fix memory error (memory allocated by calloc() should be freed with free()) 30/36730/1 accepted/tizen/tv/20150312.105931 submit/tizen_tv/20150312.103027
authorKim Tae Soo <taesoo46.kim@samsung.com>
Thu, 12 Mar 2015 10:28:10 +0000 (19:28 +0900)
committerKim Tae Soo <taesoo46.kim@samsung.com>
Thu, 12 Mar 2015 10:28:10 +0000 (19:28 +0900)
Change-Id: I779b8f4a4ee795283d2643da025244fb08433133
Signed-off-by: Kim Tae Soo <taesoo46.kim@samsung.com>
src/data/category_info.cpp
src/views/context-view.cpp

index 803d902..d3f4123 100644 (file)
@@ -89,7 +89,9 @@ void CCategoryInfo::Destroy(void)
        if (m->memberList) {
                EINA_LIST_FREE(m->memberList, obj) {
                        item = (CListMember*)obj;
-                       delete item->mediaId;
+                       // This value is from media_info_get_media_id.
+                       // So should be freed with free().
+                       free(item->mediaId);
                        delete item;
                }
        }
index 638999e..7a47d52 100644 (file)
@@ -103,7 +103,6 @@ struct SContextView {
        Evas_Object *playbtn;
        Evas_Object *first_line[TABLE_MAX_COL];
        Evas_Object *last_line[TABLE_MAX_COL];
-       //Evas_Object *popup;
        CRemovePopupWindow *popup;
        CPlayListCtxPopup *ctxpopup;
        Ecore_Idler *idler;