]> git.ipfire.org Git - thirdparty/libvirt.git/commit
util: json: Report non-OOM error on yajl failure
authorPeter Krempa <pkrempa@redhat.com>
Wed, 24 Feb 2021 09:13:27 +0000 (10:13 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 2 Mar 2021 08:50:20 +0000 (09:50 +0100)
commit0af84a81fcd5e499ec720d5748324fe631d1bc24
tree47cb23a387ccb730997c3827e37d6dc9e45ec3de
parente09c8527823673d65531a6d1ccd12a7cd9742ddd
util: json: Report non-OOM error on yajl failure

The yajl library returns a wide range of error codes so reporting OOM on
any failure is wrong. In case the error was really based by memory issue
the error reporting will probably cause an abort anyways. Change the
error message so that we know that it happened in JSON at least.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Laine Stump <laine@redhat.com>
src/util/virjson.c