Release 'item_list' when handle is destroyed 81/230481/3 accepted/tizen/unified/20200411.115612 submit/tizen/20200410.073041
authorjiyong.min <jiyong.min@samsung.com>
Fri, 10 Apr 2020 05:41:06 +0000 (14:41 +0900)
committerjiyong.min <jiyong.min@samsung.com>
Fri, 10 Apr 2020 05:55:09 +0000 (14:55 +0900)
  - For normal case, 'item_list' will be released after it is used(update_to_db is called).
    If handle is destroyed before update_to_db() is called, memory leak occur.

Change-Id: I18111eea9fef4bd4054146b9a0ddba4f84ad1f4d

src/media_playlist.c
src/media_tag.c

index 3d76b6f..c1005bf 100755 (executable)
@@ -296,6 +296,8 @@ int media_playlist_destroy(media_playlist_h playlist)
 
        content_retip_if_fail(playlist);
 
+       __media_playlist_item_release(_playlist);
+
        g_free(_playlist->name);
        g_free(_playlist->thumbnail_path);
        g_free(_playlist);
index e9c9e97..1c5fca6 100755 (executable)
@@ -168,6 +168,8 @@ int media_tag_destroy(media_tag_h tag)
 
        content_retip_if_fail(tag);
 
+       __media_tag_item_release(_tag);
+
        g_free(_tag->name);
        g_free(_tag);