[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[patch #5911] CVS 1.12.13 - fixed memory leaks errors reported by valgri
Mark D. Baushke
[patch #5911] CVS 1.12.13 - fixed memory leaks errors reported by valgrind/memcheck
Sat, 26 May 2007 19:04:51 +0000
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:184.108.40.206) Gecko/20070327 Ubuntu/dapper-security Firefox/220.127.116.11
Follow-up Comment #1, patch #5911 (project cvs):
The patch to add.c is okay, but would be more efficient if put
before the 'goto skip_this_file;' statement where it is certain
that vers is not NULL.
The patch to admin.c is wrong as getgrnam() returns a pointer
to an internal static object and that pointer should NOT be
free()d. This code was also moved into subr.c::is_admin() in
the main trunk
The patches to checkout.c, diff.c, find_names.c, import.c, ls.c
all look good (modulo formatting in a few cases).
The edit.c patches to find_editors_and_output() and edit_fileproc()
were still good. The others had already been fixed.
A comment was desirable in hash.c::mergelists() possibly
/* If the node is already in the list, then free
the duplicate which was not inserted. */
In history.c, there is no need to check fname for non-NULL before
doing the free() on it. Also, the memset() in read_hrecs_file()
after the xnrealloc() call seems wrong to me.
Why are you zeroing out hrec_max bytes?
I would have thought you would want to zero the records that
were added to the overall structure (i.e., the last
HREC_INCREMENT * sizeof (struct href) bytes) if they needed
to be initialized at all.
I still have to go through your patches to main.c,
parseinfo.c, rcs.c, sanity.sh, subr.c, tag.c, and update.c
which I have only glanced at so far. However, I thought you
might be able to address the history.c questions.
Reply to this item at:
Message sent via/by Savannah