[libvirt] [PATCH] nwfilter: Remove redundant check if object exists

Daniel P. Berrangé berrange at redhat.com
Thu Jun 28 08:05:10 UTC 2018


On Thu, Jun 28, 2018 at 09:53:48AM +0200, Pavel Hrdina wrote:
> The same check is done by virNWFilterBindingObjListAdd().  The main
> issue with the current code is that if the object already exists we
> would leak 'def' because 'obj' would be set and the cleanup code frees
> 'def' only if 'obj' is NULL.
> 
> Signed-off-by: Pavel Hrdina <phrdina at redhat.com>
> ---
>  src/nwfilter/nwfilter_driver.c | 7 -------
>  1 file changed, 7 deletions(-)

Reviewed-by: Daniel P. Berrangé <berrange at redhat.com>


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|




More information about the libvir-list mailing list