More GC tidyups

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@4953 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 1999-09-28 11:10:34 +00:00
parent c315156563
commit 11ef04f603
12 changed files with 72 additions and 57 deletions

View file

@ -128,11 +128,11 @@ NSHomeDirectoryForUser(NSString *login_name)
if (n > 1024)
{
/* Buffer not big enough, so dynamically allocate it */
nb = (char *)objc_malloc(sizeof(char)*(n+1));
nb = (char *)NSZoneMalloc(NSDefaultMallocZone(), sizeof(char)*(n+1));
n = GetEnvironmentVariable("HOMEPATH", nb, n+1);
nb[n] = '\0';
s = [NSString stringWithCString: nb];
free(nb);
NSZoneFree(NSDefaultMallocZone(), nb);
return s;
}
else