19.06.2024 18:27, Alex Bennée пишет:
> Dmitry Osipenko <dmitry.osipe...@collabora.com> writes:
> 
>> From: Antonio Caggiano <antonio.caggi...@collabora.com>
>>
>> Support BLOB resources creation, mapping and unmapping by calling the
>> new stable virglrenderer 0.10 interface. Only enabled when available and
>> via the blob config. E.g. -device virtio-vga-gl,blob=true
>>
> <snip>
>>  
>>  #if VIRGL_VERSION_MAJOR >= 1
>> +static void virgl_cmd_resource_create_blob(VirtIOGPU *g,
>> +                                           struct virtio_gpu_ctrl_command 
>> *cmd)
>> +{
>> +    struct virgl_renderer_resource_create_blob_args virgl_args = { 0 };
>> +    g_autofree struct virtio_gpu_virgl_resource *res;
> 
> Newer compilers rightly complain that g_free may be called on an
> uninitialised value (if we early return). Setting to NULL should be
> enough here.

Good catch! GCC 13 doesn't detect it

-- 
Best regards,
Dmitry


Reply via email to