]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
lxcProcReadMeminfo: Drop needless label
authorMichal Privoznik <mprivozn@redhat.com>
Mon, 28 Feb 2022 14:27:24 +0000 (15:27 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Mon, 7 Mar 2022 13:01:48 +0000 (14:01 +0100)
After previous cleanups, the cleanup label is no longer needed
and can be removed.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/lxc/lxc_fuse.c

index 1dedbc406954aa4d3fd6723170941e3254287824..7c435803e913f68ea55f5a092219363fa7aeab31 100644 (file)
@@ -162,14 +162,12 @@ lxcProcReadMeminfo(char *hostpath,
     fp = fopen(hostpath, "r");
     if (fp == NULL) {
         virReportSystemError(errno, _("Cannot open %s"), hostpath);
-        res = -errno;
-        goto cleanup;
+        return -errno;
     }
 
     if (fseek(fp, offset, SEEK_SET) < 0) {
         virReportSystemError(errno, "%s", _("fseek failed"));
-        res = -errno;
-        goto cleanup;
+        return -errno;
     }
 
     res = -1;
@@ -249,7 +247,6 @@ lxcProcReadMeminfo(char *hostpath,
         res = size;
     memcpy(buf, virBufferCurrentContent(new_meminfo), res);
 
- cleanup:
     return res;
 }