diff options
-rw-r--r-- | post_proc/volume_listener.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/post_proc/volume_listener.c b/post_proc/volume_listener.c index 2759bea6..62acd6f5 100644 --- a/post_proc/volume_listener.c +++ b/post_proc/volume_listener.c @@ -664,7 +664,7 @@ static int vol_prc_lib_create(const effect_uuid_t *uuid, static int vol_prc_lib_release(effect_handle_t handle) { - struct listnode *node = NULL; + struct listnode *node, *temp_node_next; vol_listener_context_t *context = NULL; vol_listener_context_t *recv_contex = (vol_listener_context_t *)handle; int status = -1; @@ -674,7 +674,7 @@ static int vol_prc_lib_release(effect_handle_t handle) pthread_mutex_lock(&vol_listner_init_lock); // check if the handle/context provided is valid - list_for_each(node, &vol_effect_list) { + list_for_each_safe(node, temp_node_next, &vol_effect_list) { context = node_to_item(node, struct vol_listener_context_s, effect_list_node); if ((memcmp(&(context->desc->uuid), &(recv_contex->desc->uuid), sizeof(effect_uuid_t)) == 0) && (context->session_id == recv_contex->session_id) |