]>
git.ipfire.org Git - thirdparty/libvirt.git/commit
nss: Fix memory leak in findLease()
path is allocated by asprintf() and must be freed later if realloc() fails.
Restructure the code to allocate path only after realloc() succeeds,
avoiding the need for an extra free().
Found by Linux Verification Center (linuxtesting.org) with Svace.
Reported-by: Dmitry Fedin <d.fedin@fobos-nt.ru>
Signed-off-by: Alexander Kuznetsov <kuznetsovam@altlinux.org>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>