]> git.ipfire.org Git - thirdparty/libvirt.git/commit
nss: Don't leak memory on parse error
authorMichal Privoznik <mprivozn@redhat.com>
Fri, 9 Aug 2019 08:37:05 +0000 (10:37 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Fri, 9 Aug 2019 10:17:19 +0000 (12:17 +0200)
commit0dc84c347a57e828f836643bf8efcc3fea37d38e
tree9437538cf467b31364cf452d2fe27cbe9c65dfed
parentfd21db659d5aafa99ce1e324a3e08eb43c74c5d1
nss: Don't leak memory on parse error

If yajl_parse() fails, we try to print an error message. For
that, yajl_get_error() is used. However, its documentation say
that caller is also responsible for freeing the memory it
allocates by using yajl_free_error().

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
tools/nss/libvirt_nss_leases.c
tools/nss/libvirt_nss_macs.c