Skip to content

Commit 5951cf5

Browse files
Merge pull request opencontainers#1533 from keloyang/close-negative-descriptor
Remove the code that close negative descriptor
2 parents c5e4c31 + 5428532 commit 5951cf5

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)