[vlc-devel] [PATCH] directx: fix presumed memory leak
robux4 at ycbcr.xyz
Thu Oct 1 09:14:19 CEST 2020
On 2020-10-01 9:00, Alexandre Janniaux wrote:
> 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.
Personally I would use alloca() everywhere so we can try possible stack
overflow sources, but I don't think this policy was agreed on, let alone
the use of alloca().
>> 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:
>> vlc-devel mailing list
>> To unsubscribe or modify your subscription options:
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
More information about the vlc-devel