(add): Plug file descriptor leak.
This commit is contained in:
parent
f915f91b47
commit
e1cd0bdc21
1 changed files with 3 additions and 1 deletions
|
@ -36,6 +36,8 @@
|
|||
#include <fcntl.h>
|
||||
#if defined(_WIN32)
|
||||
#include <io.h>
|
||||
#else
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include <sys/stat.h>
|
||||
|
||||
|
@ -214,7 +216,7 @@ add(void)
|
|||
natp->nat_rejects[i] = 0;
|
||||
natp->nat_newstim = 0;
|
||||
natp->nat_annotim = 0;
|
||||
(void)creat(mailbox(buf, coun), S_IRWUG);
|
||||
close(creat(mailbox(buf, coun), S_IRWUG));
|
||||
} else
|
||||
pr("No special initializations done...\n");
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue