From: Cole Robinson Date: Mon, 7 Oct 2019 20:13:19 +0000 (-0400) Subject: security: dac: Drop !parent handling in SetImageLabelInternal X-Git-Tag: v5.9.0-rc1~289 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a7262a664d514b6d9f49c6e40b5a581b9bc271ec;p=thirdparty%2Flibvirt.git security: dac: Drop !parent handling in SetImageLabelInternal The only caller always passes in a non-null parent Reviewed-by: Daniel Henrique Barboza Reviewed-by: Michal Privoznik Signed-off-by: Cole Robinson --- diff --git a/src/security/security_dac.c b/src/security/security_dac.c index 347a7a5f63..b3e7c6bd17 100644 --- a/src/security/security_dac.c +++ b/src/security/security_dac.c @@ -895,9 +895,8 @@ virSecurityDACSetImageLabelInternal(virSecurityManagerPtr mgr, return 0; disk_seclabel = virStorageSourceGetSecurityLabelDef(src, SECURITY_DAC_NAME); - if (parent) - parent_seclabel = virStorageSourceGetSecurityLabelDef(parent, - SECURITY_DAC_NAME); + parent_seclabel = virStorageSourceGetSecurityLabelDef(parent, + SECURITY_DAC_NAME); if (disk_seclabel && (!disk_seclabel->relabel || disk_seclabel->label)) { if (!disk_seclabel->relabel)