diff --git a/ChangeLog b/ChangeLog index b4108871d..35f17b848 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2015-02-16 Wolfgang Lux + + * Source/NSData.m (writeToFile:options:error:): Fix leak of open + file descriptor on systems where mkstemp is defined. + 2015-02-15 Richard Frith-Macdonald * config/objc-sys-dynamic.m4: Check for windows before anything else diff --git a/Source/NSData.m b/Source/NSData.m index a1a8ae166..5164fcd7e 100644 --- a/Source/NSData.m +++ b/Source/NSData.m @@ -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) {