
On 01/12/2011 10:23 AM, Cole Robinson wrote:
If the selinux driver is the default, it will lead to a null dereference. This change should still yeild the intended result, since a null model basically implies 'use the default'.
Signed-off-by: Cole Robinson <crobinso@redhat.com> --- src/security/security_driver.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/src/security/security_driver.c b/src/security/security_driver.c index 5711aee..7d2e0de 100644 --- a/src/security/security_driver.c +++ b/src/security/security_driver.c @@ -82,7 +82,8 @@ virSecurityIsSpecifiedDriver(virSecurityManagerPtr mgr, { bool ret = true;
- if (!STREQ(virSecurityManagerGetModel(mgr), def->seclabel.model)) { + if (def->seclabel.model && + !STREQ(virSecurityManagerGetModel(mgr), def->seclabel.model)) {
ACK; and this probably also fixes segfaults for other drivers given your 3/7 cleanup. -- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org