From eea0d6edeea67c830ac8edb212e1ad66b4757b8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Miros=C5=82aw?= Date: Wed, 21 Jun 2023 22:38:31 +0200 Subject: [PATCH] pipes: Plug pipe fd leak in "Unable to set a pipe size" error case. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Piotr Figiel Signed-off-by: Michał Mirosław --- criu/pipes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/criu/pipes.c b/criu/pipes.c index 43ff06e3d..daada8830 100644 --- a/criu/pipes.c +++ b/criu/pipes.c @@ -434,7 +434,7 @@ int dump_one_pipe_data(struct pipe_data_dump *pd, int lfd, const struct fd_parms /* steal_pipe has to be able to fit all data from a target pipe */ if (fcntl(steal_pipe[1], F_SETPIPE_SZ, pipe_size) < 0) { pr_perror("Unable to set a pipe size"); - goto err; + goto err_close; } bytes = tee(lfd, steal_pipe[1], pipe_size, SPLICE_F_NONBLOCK);