summaryrefslogtreecommitdiff
blob: c0b0498fc40f731cfa4c43c22e9d1a5269a517c4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
diff -rup libvirt-0.6.2/src/security_selinux.c new/src/security_selinux.c
--- libvirt-0.6.2/src/security_selinux.c	2009-05-10 22:04:25.000000000 -0400
+++ new/src/security_selinux.c	2009-05-10 22:06:09.000000000 -0400
@@ -338,6 +338,9 @@ SELinuxSetSecurityImageLabel(virConnectP
 {
     const virSecurityLabelDefPtr secdef = &vm->def->seclabel;
 
+    if (!disk->src)
+        return 0;
+
     if (disk->shared) {
         return SELinuxSetFilecon(conn, disk->src, default_image_context);
     } else if (disk->readonly) {