Avoid a memory leak by using reallocf() instead of realloc().

This commit is contained in:
Tim J. Robbins 2003-01-10 02:58:25 +00:00
parent 73e8989de8
commit 098b8611cb
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=109040

View File

@ -222,7 +222,7 @@ getcwd(pt, size)
}
off = bpt - pt;
len = ept - bpt;
if ((pt = realloc(pt, ptsize *= 2)) == NULL)
if ((pt = reallocf(pt, ptsize *= 2)) == NULL)
goto err;
bpt = pt + off;
ept = pt + ptsize;