Oops ... error in last mod reverted.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@13986 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-Macdonald 2002-06-27 13:18:47 +00:00
parent 2b011a54c3
commit af44030f47

View file

@ -919,7 +919,7 @@ tables:
*/
r = _fastMallocBuffer(bytes);
memcpy(r, ptr, bytes);
if (ptr != buf && ptr != *dst)
if (ptr != buf && (dst == 0 || ptr != *dst))
{
NSZoneFree(zone, ptr);
}
@ -951,7 +951,7 @@ tables:
}
*dst = ptr;
}
else if (ptr != buf && (dst == 0 || ptr != *dst))
else if (ptr != buf && dst != 0 && ptr != *dst)
{
NSZoneFree(zone, ptr);
}
@ -1456,7 +1456,7 @@ tables:
*/
r = _fastMallocBuffer(bytes);
memcpy(r, ptr, bytes);
if (ptr != buf && ptr != *dst)
if (ptr != buf && (dst == 0 || ptr != *dst))
{
NSZoneFree(zone, ptr);
}
@ -1488,7 +1488,7 @@ tables:
}
*dst = ptr;
}
else if (ptr != buf && (dst == 0 || ptr != *dst))
else if (ptr != buf && dst != 0 && ptr != *dst)
{
NSZoneFree(zone, ptr);
}