aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2017-04-04 16:25:39 +0200
committerIngela Anderton Andin <[email protected]>2017-04-04 16:25:39 +0200
commitc04e4cd533d9a4185eadda3141e0783b0f5a0fae (patch)
treefe4796bf3371069132cf591b7524ba48adf6a4cf /erts/emulator
parent38cd77b3e7afbf3973167c5a339381707e3d95bc (diff)
parentd25ad84195ca42969fbfb017a52aab8c8effc246 (diff)
downloadotp-c04e4cd533d9a4185eadda3141e0783b0f5a0fae.tar.gz
otp-c04e4cd533d9a4185eadda3141e0783b0f5a0fae.tar.bz2
otp-c04e4cd533d9a4185eadda3141e0783b0f5a0fae.zip
Merge branch 'maint-19' into maint
Diffstat (limited to 'erts/emulator')
-rw-r--r--erts/emulator/drivers/unix/unix_efile.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/erts/emulator/drivers/unix/unix_efile.c b/erts/emulator/drivers/unix/unix_efile.c
index 3ff68a8859..0acc2432a7 100644
--- a/erts/emulator/drivers/unix/unix_efile.c
+++ b/erts/emulator/drivers/unix/unix_efile.c
@@ -430,6 +430,9 @@ efile_openfile(Efile_error* errInfo, /* Where to return error codes. */
if ( (stat("/dev/null", &nullstatbuf) < 0)
|| (statbuf.st_ino != nullstatbuf.st_ino)
|| (statbuf.st_dev != nullstatbuf.st_dev) ) {
+#ifdef HAVE_FSTAT
+ efile_closefile(fd);
+#endif
errno = EISDIR;
return check_error(-1, errInfo);
}