From: Lennart Poettering Date: Mon, 4 Dec 2023 17:19:27 +0000 (+0100) Subject: dissect-image: handle 'continue' event in metadata acquisition uniformly X-Git-Tag: v256-rc1~1503^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=29b4db7ede36ecba27b417e8d3e834ebacd36e89;p=thirdparty%2Fsystemd.git dissect-image: handle 'continue' event in metadata acquisition uniformly Let's jump to the same label in all cases, that closes the associated pipe, systematically. --- diff --git a/src/shared/dissect-image.c b/src/shared/dissect-image.c index b63973cea8c..7142429642f 100644 --- a/src/shared/dissect-image.c +++ b/src/shared/dissect-image.c @@ -3494,7 +3494,7 @@ int dissected_image_acquire_metadata(DissectedImage *m, DissectImageFlags extra_ if (r < 0) goto inner_fail; - continue; + goto next; } default: @@ -3507,14 +3507,14 @@ int dissected_image_acquire_metadata(DissectedImage *m, DissectImageFlags extra_ if (fd < 0) { log_debug_errno(fd, "Failed to read %s file of image, ignoring: %m", paths[k]); - fds[2*k+1] = safe_close(fds[2*k+1]); - continue; + goto next; } r = copy_bytes(fd, fds[2*k+1], UINT64_MAX, 0); if (r < 0) goto inner_fail; + next: fds[2*k+1] = safe_close(fds[2*k+1]); }