]> xenbits.xensource.com Git - libvirt.git/commitdiff
virSecuritySELinuxRestoreFileLabel: Rename 'err' label
authorMichal Privoznik <mprivozn@redhat.com>
Mon, 10 Sep 2018 07:45:56 +0000 (09:45 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Tue, 18 Sep 2018 15:12:53 +0000 (17:12 +0200)
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>
src/security/security_selinux.c

index 288f3628f7813526d573432e185c4a902ab83685..35f18e1738ddf2e6b463305332ad8f46662e0449 100644 (file)
@@ -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;