Cole Robinson 4465a6
diff -rup libvirt-0.6.2/src/security_selinux.c new/src/security_selinux.c
Cole Robinson 4465a6
--- libvirt-0.6.2/src/security_selinux.c	2009-05-10 22:04:25.000000000 -0400
Cole Robinson 4465a6
+++ new/src/security_selinux.c	2009-05-10 22:06:09.000000000 -0400
Cole Robinson 4465a6
@@ -338,6 +338,9 @@ SELinuxSetSecurityImageLabel(virConnectP
Cole Robinson 4465a6
 {
Cole Robinson 4465a6
     const virSecurityLabelDefPtr secdef = &vm->def->seclabel;
Cole Robinson 4465a6
 
Cole Robinson 4465a6
+    if (!disk->src)
Cole Robinson 4465a6
+        return 0;
Cole Robinson 4465a6
+
Cole Robinson 4465a6
     if (disk->shared) {
Cole Robinson 4465a6
         return SELinuxSetFilecon(conn, disk->src, default_image_context);
Cole Robinson 4465a6
     } else if (disk->readonly) {