Fix for SVACE defects
[platform/core/api/sound-pool.git] / src / soundpool.c
index 2c8707d..bbcd013 100644 (file)
@@ -203,8 +203,6 @@ sound_pool_error_e _sound_pool_activate(sound_pool_t *pool)
 
        _sound_stream_priority_update_playback(pool->mgr_priority);
 
-       /* Generate array of all AlSources in pool */
-       GPtrArray *streams = NULL;
        if (g_hash_table_size(pool->streams) > 0) {
                SP_RETVM_IF(!alcMakeContextCurrent(pool->al_context),
                                SOUND_POOL_ERROR_INVALID_OPERATION, "Can't set current context.");
@@ -213,9 +211,6 @@ sound_pool_error_e _sound_pool_activate(sound_pool_t *pool)
                SP_INFO("Resuming [%d] number of streams.", len);
        }
 
-       if (streams)
-               g_ptr_array_free(streams, TRUE);
-
        SP_INFO("Sound pool has been activated");
 
        if (pool->state_cb_info.callback)
@@ -237,8 +232,6 @@ sound_pool_error_e _sound_pool_deactivate(sound_pool_t *pool)
        sound_pool_state_e old_state = pool->state;
        pool->state = SOUND_POOL_STATE_INACTIVE;
 
-       /* Generate array of all AlSources in pool */
-       GPtrArray *streams = NULL;
        if (g_hash_table_size(pool->streams) > 0) {
                SP_RETVM_IF(!alcMakeContextCurrent(pool->al_context),
                                SOUND_POOL_ERROR_INVALID_OPERATION, "Can't set current context.");
@@ -247,9 +240,6 @@ sound_pool_error_e _sound_pool_deactivate(sound_pool_t *pool)
                SP_INFO("Suspending [%d] number of streams.", len);
        }
 
-       if (streams)
-               g_ptr_array_free(streams, TRUE);
-
        SP_INFO("Sound pool has been deactivated");
 
        if (pool->state_cb_info.callback)