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:
wlux 2015-02-16 17:27:57 +00:00
parent 0f0e4330fe
commit 58087334b8
2 changed files with 6 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2015-02-16 Wolfgang Lux <wolfgang.lux@gmail.com>
* Source/NSData.m (writeToFile:options:error:): Fix leak of open
file descriptor on systems where mkstemp is defined.
2015-02-15 Richard Frith-Macdonald <rfm@gnu.org>
* config/objc-sys-dynamic.m4: Check for windows before anything else

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)
{