Skip to content

Commit 5428532

Browse files
author
yangshukui
committed
remove the code that close negative descriptor
Signed-off-by: yangshukui <[email protected]>
1 parent 6ca8b74 commit 5428532

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

libcontainer/nsenter/nsexec.c

+1-2
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,7 @@ static int write_file(char *data, size_t data_len, char *pathfmt, ...)
143143

144144
fd = open(path, O_RDWR);
145145
if (fd < 0) {
146-
ret = -1;
147-
goto out;
146+
return -1;
148147
}
149148

150149
len = write(fd, data, data_len);

0 commit comments

Comments
 (0)