mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
Set zone when reading from file
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@28451 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
883af7762c
commit
bca4c6dd98
1 changed files with 2 additions and 1 deletions
|
@ -3256,7 +3256,7 @@ getBytes(void* dst, void* src, unsigned len, unsigned limit, unsigned *pos)
|
|||
#if GS_WITH_GC
|
||||
owned = shouldFree; // Free memory on finalisation.
|
||||
#else
|
||||
if (shouldFree == NO || aBuffer == 0)
|
||||
if (shouldFree == NO)
|
||||
{
|
||||
zone = 0; // Don't free this memory.
|
||||
}
|
||||
|
@ -3335,6 +3335,7 @@ getBytes(void* dst, void* src, unsigned len, unsigned limit, unsigned *pos)
|
|||
return nil;
|
||||
}
|
||||
#else
|
||||
zone = GSObjCZone(self);
|
||||
if (readContentsOfFile(path, &bytes, &length, zone) == NO)
|
||||
{
|
||||
[self release];
|
||||
|
|
Loading…
Reference in a new issue