]> xenbits.xensource.com Git - libvirt.git/commit
tests: libxl: Fix a segfault when libxl configuration setup fails
authorJulio Faracco <jcfaracco@gmail.com>
Thu, 2 Aug 2018 04:06:39 +0000 (01:06 -0300)
committerErik Skultety <eskultet@redhat.com>
Thu, 2 Aug 2018 08:35:35 +0000 (10:35 +0200)
commit8e09f9afc712712f8a4747c69836800a11a6f6f3
treebc496f104c7d0ed09410316022271f3a66b88cf1
parent3c73beebca8f7e5b6802303416e8a96d37dbfbce
tests: libxl: Fix a segfault when libxl configuration setup fails

This commit fixes a segmentation fault caused by missing conditional to
check if libxl configuration was properly created by the test. If the
configuration was not properly created, libxlDriverConfigNew() function
will return NULL and cause a segfault at cfg->caps = NULL during the
cleanup.

Signed-off-by: Julio Faracco <jcfaracco@gmail.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
tests/libxlxml2domconfigtest.c