On Tue, Feb 19, 2019 at 04:36:28PM +0000, Paul Durrant wrote:
> > The locally allocated QDict-s need to be freed. ('file_layer' will be
> > freed implicitly since it is added as an object to 'driver_layer').
> > 
> > Spotted by Coverity: CID 1398649
> > 
> > While in the neighbourhood free 'driver' and 'filename' as soon as they
> > are
> > added to the QDicts. Freeing after the 'done' label doesn't make that much
> > sense as, if the error path jumps to that label, the values would be NULL
> > anyway.
> > 
> > This patch also makes that more obvious by taking the error path if
> > 'params' is NULL and then asserting that both driver and filename are
> > non-NULL in the normal path.
> > 
> > Reported-by: Peter Maydell <peter.mayd...@linaro.org>
> > Signed-off-by: Paul Durrant <paul.durr...@citrix.com>

Acked-by: Anthony PERARD <anthony.per...@citrix.com>

Thanks,

-- 
Anthony PERARD

Reply via email to