mirror of
https://github.com/checkpoint-restore/criu
synced 2025-09-03 15:55:53 +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 */
|
/* 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) {
|
if (fcntl(steal_pipe[1], F_SETPIPE_SZ, pipe_size) < 0) {
|
||||||
pr_perror("Unable to set a pipe size");
|
pr_perror("Unable to set a pipe size");
|
||||||
goto err;
|
goto err_close;
|
||||||
}
|
}
|
||||||
|
|
||||||
bytes = tee(lfd, steal_pipe[1], pipe_size, SPLICE_F_NONBLOCK);
|
bytes = tee(lfd, steal_pipe[1], pipe_size, SPLICE_F_NONBLOCK);
|
||||||
|
Reference in New Issue
Block a user