Skip to content

Commit e0efb67

Browse files
committed
Fix potential double close(2)
Signed-off-by: Felix Abecassis <fabecassis@nvidia.com>
1 parent a4b386f commit e0efb67

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

enroot.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
2+
* Copyright (c) 2020-2025, NVIDIA CORPORATION. All rights reserved.
33
*/
44

55
#include <sys/wait.h>
@@ -153,9 +153,6 @@ FILE *enroot_exec_output(uid_t uid, gid_t gid,
153153
if (ret < 0) {
154154
slurm_error("pyxis: couldn't execute enroot command");
155155
memfd_print_log(&log_fd, true, "enroot");
156-
if (log_fd >= 0)
157-
close(log_fd);
158-
159156
goto fail;
160157
}
161158

0 commit comments

Comments
 (0)