[vlc-devel] [PATCH] adaptive: playlist: Fix list cleanup

Alexandre Janniaux ajanni at videolabs.io
Thu Dec 10 15:17:22 CET 2020


Hi,

LGTM,

Regards,
--
Alexandre Janniaux
Videolabs

On Thu, Dec 10, 2020 at 03:08:15PM +0100, Hugo Beauzée-Luyssen wrote:
> Calling front() on an empty container is undefined behavior
> ---
>  modules/demux/adaptive/playlist/Inheritables.cpp | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/modules/demux/adaptive/playlist/Inheritables.cpp b/modules/demux/adaptive/playlist/Inheritables.cpp
> index c61b3f0c45..16c1ef4d2f 100644
> --- a/modules/demux/adaptive/playlist/Inheritables.cpp
> +++ b/modules/demux/adaptive/playlist/Inheritables.cpp
> @@ -58,7 +58,7 @@ AttrsNode::AttrsNode(Type t, AttrsNode *parent_)
>
>  AttrsNode::~AttrsNode()
>  {
> -    while(props.front())
> +    while(!props.empty())
>      {
>          delete props.front();
>          props.pop_front();
> --
> 2.29.2
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list