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

2020-03-30 Thread Daniel P . Berrangé
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 > --- > src/util/virjson.c

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

2020-03-30 Thread Michal Privoznik
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 --- src/util/virjson.c | 2 +- tools/nss/libvirt_nss_leases.c | 3 ++- tools/nss/libvirt_ns