[PATCH 1/3] Don't pass NULL to yajl_free()

Daniel P. Berrangé berrange at redhat.com
Mon Mar 30 11:02:01 UTC 2020


On Mon, Mar 30, 2020 at 11:24:58AM +0200, Michal Privoznik wrote:
> Unfortunately, yajl_free() is not NOP on NULL. It really does
> expect a valid pointer. Therefore, check whether the pointer we
> want to pass to it is NULL or not.
> 
> Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
> ---
>  src/util/virjson.c             | 2 +-
>  tools/nss/libvirt_nss_leases.c | 3 ++-
>  tools/nss/libvirt_nss_macs.c   | 3 ++-
>  3 files changed, 5 insertions(+), 3 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