Signed-off-by: zhongtao <zhongtao17@huawei.com> (cherry picked from commit bbcaf5a7227e418497e56c9f3495457e8cf7c652)
28 lines
971 B
Diff
28 lines
971 B
Diff
From 2acc11797139e6524c1994196e7cd99d35b1a8b3 Mon Sep 17 00:00:00 2001
|
|
From: zhongtao <zhongtao17@huawei.com>
|
|
Date: Thu, 11 Apr 2024 15:48:43 +0800
|
|
Subject: [PATCH 208/213] bugfix for the pre-created pipe was not closed when
|
|
the pipe creation failed
|
|
|
|
Signed-off-by: zhongtao <zhongtao17@huawei.com>
|
|
---
|
|
src/daemon/modules/runtime/isula/isula_rt_ops.c | 2 ++
|
|
1 file changed, 2 insertions(+)
|
|
|
|
diff --git a/src/daemon/modules/runtime/isula/isula_rt_ops.c b/src/daemon/modules/runtime/isula/isula_rt_ops.c
|
|
index 6a5e0125..949bce7a 100644
|
|
--- a/src/daemon/modules/runtime/isula/isula_rt_ops.c
|
|
+++ b/src/daemon/modules/runtime/isula/isula_rt_ops.c
|
|
@@ -792,6 +792,8 @@ static int shim_create(bool fg, const char *id, const char *workdir, const char
|
|
|
|
if (pipe2(shim_stdout_pipe, O_CLOEXEC) != 0) {
|
|
ERROR("Failed to create pipe for shim stdout");
|
|
+ close(shim_stderr_pipe[0]);
|
|
+ close(shim_stderr_pipe[1]);
|
|
return -1;
|
|
}
|
|
|
|
--
|
|
2.25.1
|
|
|