mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 08:21:25 +00:00
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:
parent
c315156563
commit
11ef04f603
12 changed files with 72 additions and 57 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue