[leafnode-list] Re: Memory leak
Matthias Andree
ma at dt.e-technik.uni-dortmund.de
Mon Dec 27 23:55:53 CET 2004
Lloyd Zusman <ljz at asfast.com> writes:
> Yes, this seems to correct the memory leak, but unfortunately, there
> is a slight problem with the patch. The patch puts a superfluous
> "free(overview)" at the end of the xgetover() routine. This will
> free an already freed block, which can have unpredictable results.
> If you look 37-38 lines before the end of that routine, you'll see
> that the "overview" block is already being freed at that point.
Right. I wonder why this escaped me when testing with valgrind.
> Apply the following patch AFTER applying the one that fixes the
> memory leak:
>
> *** xoverutil.c.orig Mon Dec 27 17:22:56 2004
> --- xoverutil.c Mon Dec 27 17:24:13 2004
> ***************
> *** 564,570 ****
> g->count = current;
> }
>
> - free(overview);
> return 1;
> }
>
> --- 564,569 ----
Merged into DARCS.
--
Matthias Andree
More information about the leafnode-list
mailing list