[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH] xen-block: Avoid leaks on new error path
On Tue, 4 Jul 2023 at 18:19, Anthony PERARD <anthony.perard@xxxxxxxxxx> wrote: > > From: Anthony PERARD <anthony.perard@xxxxxxxxxx> > > 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 of both success and error path. > > Coverity only spotted the leak of qdicts (*_layer variables). > > Reported-by: Peter Maydell <peter.maydell@xxxxxxxxxx> > Fixes: Coverity CID 1508722, 1398649 > Fixes: 189829399070 ("xen-block: Use specific blockdev driver") > Signed-off-by: Anthony PERARD <anthony.perard@xxxxxxxxxx> Reviewed-by: Peter Maydell <peter.maydell@xxxxxxxxxx> thanks -- PMM
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |