]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: monitor: Fix device matching in qemuMonitorJSONBlockIoThrottleInfo
authorPeter Krempa <pkrempa@redhat.com>
Wed, 22 Aug 2018 11:20:52 +0000 (13:20 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 22 Aug 2018 11:55:27 +0000 (13:55 +0200)
commit2cad501bcb4eee0989a103997df9d541fe9e9a86
treed097548ec387ee62575c89c0a8cdae5cc7e01135
parent8aced2ea32cb74fdb1f038161e6842aa80d6ae51
qemu: monitor: Fix device matching in qemuMonitorJSONBlockIoThrottleInfo

We should compare the alias/qdev id only when it was provided by the
caller and when it was found in the reply. Otherwise we could
dereference a NULL pointer. STRNEQ_NULLABLE is not appropriate since
it would return 'true' if the string was not present in the JSON output.

Found by Coverity.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
src/qemu/qemu_monitor_json.c