NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: xmalloc.c issue (after xfree(cp), cp is used in irealloc())



On May 14,  6:12pm, martin%duskware.de@localhost (Martin Husemann) wrote:
-- Subject: Re: xmalloc.c issue (after xfree(cp), cp is used in irealloc())

| On Mon, May 14, 2012 at 12:04:05PM -0400, Christos Zoulas wrote:
| > The code is clearly wrong. I guess we are lucky that it does not get
| > invoked. Here's a fix.
| 
| How would imalloc() ever return the same address (while it has not been
| freed) again so the optimization could trigger now?

cp is freed, and then imalloc() is called. In anycase the code I have in tcsh
which is from the same Chris Kingsley's malloc frees the pointer after the
allocation.

christos


Home | Main Index | Thread Index | Old Index