mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 22:25:25 +00:00
virSecuritySELinuxRestoreFileLabel: Rename 'err' label
This label is used in both successful and error paths. Therefore it should be named 'cleanup' and not 'err'. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: John Ferlan <jferlan@redhat.com>
This commit is contained in:
parent
7a9ca0fae9
commit
c9318499a7
@ -1306,13 +1306,13 @@ virSecuritySELinuxRestoreFileLabel(virSecurityManagerPtr mgr,
|
||||
if (virFileResolveLink(path, &newpath) < 0) {
|
||||
VIR_WARN("cannot resolve symlink %s: %s", path,
|
||||
virStrerror(errno, ebuf, sizeof(ebuf)));
|
||||
goto err;
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
if (stat(newpath, &buf) != 0) {
|
||||
VIR_WARN("cannot stat %s: %s", newpath,
|
||||
virStrerror(errno, ebuf, sizeof(ebuf)));
|
||||
goto err;
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
if (getContext(mgr, newpath, buf.st_mode, &fcon) < 0) {
|
||||
@ -1325,7 +1325,7 @@ virSecuritySELinuxRestoreFileLabel(virSecurityManagerPtr mgr,
|
||||
rc = virSecuritySELinuxSetFilecon(mgr, newpath, fcon);
|
||||
}
|
||||
|
||||
err:
|
||||
cleanup:
|
||||
freecon(fcon);
|
||||
VIR_FREE(newpath);
|
||||
return rc;
|
||||
|
Loading…
Reference in New Issue
Block a user