vlc_block_helper: use block_ChainRelease for chain release
authorFrancois Cartegnie <fcvlcdev@free.fr>
Wed, 26 Oct 2016 13:56:26 +0000 (15:56 +0200)
committerFrancois Cartegnie <fcvlcdev@free.fr>
Wed, 26 Oct 2016 16:54:01 +0000 (18:54 +0200)
include/vlc_block_helper.h

index 444286f..331e268 100644 (file)
@@ -45,13 +45,7 @@ static inline void block_BytestreamInit( block_bytestream_t *p_bytestream )
 
 static inline void block_BytestreamRelease( block_bytestream_t *p_bytestream )
 {
-    for( block_t *block = p_bytestream->p_chain; block != NULL; )
-    {
-        block_t *p_next = block->p_next;
-
-        block_Release( block );
-        block = p_next;
-    }
+    block_ChainRelease( p_bytestream->p_chain );
 }
 
 /**