On Tue, Nov 30, 2010 at 08:35:19PM +0000, Nicholas Clark wrote: > On Sun, Nov 21, 2010 at 12:20:18PM -0800, Father Chrysostomos wrote: > > On November 18, 2010 01:48, Nicholas Clark wrote: > > > > + struct xpvhv_aux * const newaux = hv_auxinit(hv); > > > > > > ^^^^^^^^^ > > > That leaks in some cases. I'm not sure what the correct fix should be. (Sorry) > > > > I?ve looked at it half a dozen times, and I cannot see how it is leaking. The auxiliary structure is allocated as part of the same memory block as HvARRAY. That gets freed either at the end of the loop body or, if the loop exits early, at the end of the function (hfreeentries). > > > > That commit *did* introduce a memory leak. It was leaking a HEK. But that was fixed a few commits later. > > > > There have been more changes since then. Does it leak in current blead? > > > > Does valgrind always tell the truth? > > I can't think of an instance where it hasn't. > > I think I can see the cause of the problem. A one line solution does not > present itself. I think that this has been mooted by my just-pushed updates to S_hfreeentries for making HV freeing non-recursive. -- Monto Blanco... scorchio!Thread Previous | Thread Next