[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [leafnode-list] Re: Memory leak
Lloyd Zusman <ljz@xxxxxxxxxx> 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.
leafnode-list mailing list