]> git.ipfire.org Git - thirdparty/libvirt.git/commit
virNodeDeviceDefParse: Don't call post-parse callbacks with NULL def
authorPeter Krempa <pkrempa@redhat.com>
Mon, 18 Oct 2021 07:54:08 +0000 (09:54 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 18 Oct 2021 15:40:46 +0000 (17:40 +0200)
commit8eb08e0fc5fe42efd2b0a4226f2b71f183ba193b
treeb52350701e08e725265f6650ea1c3db39f1b7e06
parent289aa4bc5b4feccc7a4fa919ae2062493f00c14e
virNodeDeviceDefParse: Don't call post-parse callbacks with NULL def

When parsing of the node device XML fails we'd still call the post-parse
and validation callbacks which makes no sense. Additionally the
callbacks were expecting a non-NULL pointer which leads to a crash.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2014139
Fixes: d5ae634ba28
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
src/conf/node_device_conf.c