Re: [libvirt PATCH] json: do not call json_tokener_free with NULL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Nov 04, 2024 at 08:42:37 +0100, Ján Tomko wrote:
> Add an error message for the rare case if json_tokener_new
> fails (allocation failure) and guard any use of json_tokener_free
> where tok might be NULL (this was possible in libvirt-nss
> when the json file could not be opened).
> 
> https://gitlab.com/libvirt/libvirt/-/issues/581
> 
> Signed-off-by: Ján Tomko <jtomko@xxxxxxxxxx>
> Reported-by: Simon Pilkington
> ---
>  src/util/virjson.c             | 8 +++++++-
>  tools/nss/libvirt_nss_leases.c | 7 ++++++-
>  tools/nss/libvirt_nss_macs.c   | 7 ++++++-
>  3 files changed, 19 insertions(+), 3 deletions(-)

Reviewed-by: Peter Krempa <pkrempa@xxxxxxxxxx>




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux