RE: [RFC PATCH] hw/display/virtio-gpu: Fix memory leak (CID 1453811)

2021-07-14 Thread Kasireddy, Vivek
PATCH] hw/display/virtio-gpu: Fix memory leak (CID 1453811) Hi On Mon, May 31, 2021 at 2:20 PM Philippe Mathieu-Daudé mailto:phi...@redhat.com>> wrote: To avoid leaking memory on the error path, reorder the code as: - check the parameters first - check resource already existing - finally al

Re: [RFC PATCH] hw/display/virtio-gpu: Fix memory leak (CID 1453811)

2021-07-07 Thread Marc-André Lureau
Hi On Mon, May 31, 2021 at 2:20 PM Philippe Mathieu-Daudé wrote: > To avoid leaking memory on the error path, reorder the > code as: > - check the parameters first > - check resource already existing > - finally allocate memory > > Reported-by: Coverity (CID 1453811: RESOURCE_LEAK) > Fixes: e093

Re: [RFC PATCH] hw/display/virtio-gpu: Fix memory leak (CID 1453811)

2021-07-06 Thread Philippe Mathieu-Daudé
If this is not a proper fix, what would be the correct one? On 6/21/21 11:59 AM, Philippe Mathieu-Daudé wrote: > ping? > > On 6/14/21 12:52 PM, Philippe Mathieu-Daudé wrote: >> ping? >> >> On 5/31/21 12:19 PM, Philippe Mathieu-Daudé wrote: >>> To avoid leaking memory on the error path, reorder th

Re: [RFC PATCH] hw/display/virtio-gpu: Fix memory leak (CID 1453811)

2021-06-21 Thread Philippe Mathieu-Daudé
ping? On 6/14/21 12:52 PM, Philippe Mathieu-Daudé wrote: > ping? > > On 5/31/21 12:19 PM, Philippe Mathieu-Daudé wrote: >> To avoid leaking memory on the error path, reorder the >> code as: >> - check the parameters first >> - check resource already existing >> - finally allocate memory >> >> Rep

Re: [RFC PATCH] hw/display/virtio-gpu: Fix memory leak (CID 1453811)

2021-06-14 Thread Philippe Mathieu-Daudé
ping? On 5/31/21 12:19 PM, Philippe Mathieu-Daudé wrote: > To avoid leaking memory on the error path, reorder the > code as: > - check the parameters first > - check resource already existing > - finally allocate memory > > Reported-by: Coverity (CID 1453811: RESOURCE_LEAK) > Fixes: e0933d91b1c (

[RFC PATCH] hw/display/virtio-gpu: Fix memory leak (CID 1453811)

2021-05-31 Thread Philippe Mathieu-Daudé
To avoid leaking memory on the error path, reorder the code as: - check the parameters first - check resource already existing - finally allocate memory Reported-by: Coverity (CID 1453811: RESOURCE_LEAK) Fixes: e0933d91b1c ("virtio-gpu: Add virtio_gpu_resource_create_blob") Signed-off-by: Philippe