mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 09:04:13 +00:00
check to see if we should free memory
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@38529 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
19ba70e988
commit
696c4dd7a3
2 changed files with 6 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
2015-05-23 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
Source/GSString.m: Fix failure to check free when done flag before
|
||||
freeing memory.
|
||||
|
||||
2015-05-22 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSString.m:
|
||||
|
|
|
@ -1358,7 +1358,7 @@ fixBOM(unsigned char **bytes, NSUInteger*length, BOOL *owned,
|
|||
|
||||
if (0 == length)
|
||||
{
|
||||
if (0 != bytes)
|
||||
if (YES == flag && 0 != bytes)
|
||||
{
|
||||
NSZoneFree(NSZoneFromPointer(bytes), bytes);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue