[v0.2.37] fix webaudio mem leak 36/103636/3 accepted/tizen/common/20161214.160534 accepted/tizen/ivi/20161214.015314 accepted/tizen/mobile/20161214.014845 accepted/tizen/tv/20161214.015109 accepted/tizen/wearable/20161214.015200 submit/tizen/20161213.083228
authorEunhae Choi <eunhae1.choi@samsung.com>
Fri, 9 Dec 2016 04:34:53 +0000 (13:34 +0900)
committerEunhae Choi <eunhae1.choi@samsung.com>
Fri, 9 Dec 2016 07:29:57 +0000 (16:29 +0900)
Change-Id: I8cf7501cd3a99bfc76c29dc6dbc79c3e2237054f
Signed-off-by: Eunhae Choi <eunhae1.choi@samsung.com>
muse/src/muse_player.c
packaging/mmsvc-player.spec

index 6e5cd87..0a57506 100644 (file)
@@ -164,8 +164,8 @@ static bool _remove_export_data(muse_module_h module, int key, int remove_all)
 
                /* LOGE("number of remained buffer %d", g_list_length(muse_player->data_list)); */
 
-               for (iter = muse_player->data_list; iter; iter = g_list_next(iter)) {
-
+               iter = g_list_first(muse_player->data_list);
+               while (iter) {
                        export_data = (muse_player_export_data_s *)iter->data;
                        if ((export_data) &&
                                (export_data->key == key || remove_all)) {
@@ -181,6 +181,8 @@ static bool _remove_export_data(muse_module_h module, int key, int remove_all)
                                        LOGW("bo for key:%d is NULL", key);
                                }
 
+                               iter = g_list_next(iter);
+
                                muse_player->data_list = g_list_remove(muse_player->data_list, export_data);
                                g_free(export_data);
                                export_data = NULL;
@@ -190,6 +192,8 @@ static bool _remove_export_data(muse_module_h module, int key, int remove_all)
                                        g_mutex_unlock(&muse_player->list_lock);
                                        return ret;
                                }
+                       } else {
+                               iter = g_list_next(iter);
                        }
                }
 
index 92757f9..406b93f 100644 (file)
@@ -1,6 +1,6 @@
 Name:       mmsvc-player
 Summary:    A Media Player module for muse server
-Version:    0.2.36
+Version:    0.2.37
 Release:    0
 Group:      Multimedia/Libraries
 License:    Apache-2.0