mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-31 06:15:24 +00:00
pipes: Plug pipe fd leak in "Unable to set a pipe size" error case.
From: Piotr Figiel <figiel@google.com> Signed-off-by: Michał Mirosław <emmir@google.com>
This commit is contained in:
committed by
Andrei Vagin
parent
ffa1e47fd8
commit
eea0d6edee
@@ -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);
|
||||
|
Reference in New Issue
Block a user