When no DAC "label" was requested for a domain the DAC manager tried to
strdup a NULL string causing a segfault.
break;
case VIR_DOMAIN_SECLABEL_NONE:
/* no op */
+ return 0;
break;
default:
virReportError(VIR_ERR_INTERNAL_ERROR,
}
if (!seclabel->norelabel) {
- if (seclabel->imagelabel == NULL) {
+ if (seclabel->imagelabel == NULL && seclabel->label != NULL) {
seclabel->imagelabel = strdup(seclabel->label);
if (seclabel->imagelabel == NULL) {
virReportError(VIR_ERR_INTERNAL_ERROR,