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:
Richard Frith-MacDonald 2009-08-11 14:03:47 +00:00
parent 883af7762c
commit bca4c6dd98

View file

@ -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];