Re: [PATCH] xen-block: Avoid leaks on new error path

2023-07-06 Thread Paul Durrant
On 04/07/2023 18:18, Anthony PERARD wrote: From: Anthony PERARD Commit 189829399070 ("xen-block: Use specific blockdev driver") introduced a new error path, without taking care of allocated resources. So only allocate the qdicts after the error check, and free both `filename` and `driver`

Re: [PATCH] xen-block: Avoid leaks on new error path

2023-07-04 Thread Peter Maydell
On Tue, 4 Jul 2023 at 18:19, Anthony PERARD wrote: > > From: Anthony PERARD > > Commit 189829399070 ("xen-block: Use specific blockdev driver") > introduced a new error path, without taking care of allocated > resources. > > So only allocate the qdicts after the error check, and free both >

[PATCH] xen-block: Avoid leaks on new error path

2023-07-04 Thread Anthony PERARD via
From: Anthony PERARD Commit 189829399070 ("xen-block: Use specific blockdev driver") introduced a new error path, without taking care of allocated resources. So only allocate the qdicts after the error check, and free both `filename` and `driver` when we are about to return and thus taking care