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 <[email protected]>
> 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 <[email protected]>

Reply via email to