Fix leak of open file descriptor in NSData -writeToFile:atomically: on

systems where mkstemp is defined.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@38344 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Wolfgang Lux 2015-02-16 17:27:57 +00:00
parent 3f2e3c9ecd
commit 472d8232b1
2 changed files with 6 additions and 1 deletions

View file

@ -1583,8 +1583,8 @@ failure:
strncpy(thePath, theRealPath, sizeof(thePath) - 1);
thePath[sizeof(thePath) - 1] = '\0';
}
# endif
theFile = fopen(thePath, "wb");
# endif
if (theFile == 0)
{