[vlc-devel] [PATCH] directx: fix presumed memory leak

Alexandre Janniaux ajanni at videolabs.io
Thu Oct 1 09:00:05 CEST 2020


Hi,

On Thu, Oct 01, 2020 at 07:43:10AM +0200, Steve Lhomme wrote:
> It's correct but I think a cleaner way would be to just allocate the tables
> in the stack like
> DXVAHD_VPCAPS capsList[devcaps.VideoProcessorCount];

I'm not sure we want to reintroduce new VLA in the code
though. That's not for nothing that it has been relegated
into an optional features in C11 and that IIRC compilers
like compcert don't want to implement them.

>
> MSVC doesn't like these initializations, but I that ship has sailed a long
> time ago anyway.
>
> On 2020-09-17 21:18, Lyndon Brown wrote:
> > the memory allocations here are released in the error path, but not the
> > success path, which looks to be a mistake to me...
> >
> >
> > _______________________________________________
> > vlc-devel mailing list
> > To unsubscribe or modify your subscription options:
> > https://mailman.videolan.org/listinfo/vlc-devel
> >
> _______________________________________________
> 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