Skip to content

Commit 607d7c7

Browse files
committed
btl/sm: rename file after file descriptor has been closed.
Thanks George for spotting this.
1 parent 079ea14 commit 607d7c7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

opal/mca/btl/sm/btl_sm_component.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -696,6 +696,8 @@ create_rndv_file(mca_btl_sm_component_t *comp_ptr,
696696
/* only do this for the mpool case */
697697
OBJ_RELEASE(tmp_modp);
698698
}
699+
(void)close(fd);
700+
fd = -1;
699701
if (0 != rename(tmpfname, fname)) {
700702
rc = OPAL_ERR_IN_ERRNO;
701703
goto out;

0 commit comments

Comments
 (0)