src/nnn.c | 5 +++-- diff --git a/src/nnn.c b/src/nnn.c index 341a78e26682c952ab623728fe04b89a97e96df4..1023e166a4d11e343e70112409b5e04eee1703a3 100644 --- a/src/nnn.c +++ b/src/nnn.c @@ -1363,8 +1363,9 @@ if (fd == -1 && errno != EEXIST) { DPRINTF_S("open fail"); DPRINTF_S(strerror(errno)); return FALSE; - } else - close(fd); + } + + close(fd); } return TRUE;