r225677 seems to have introduced a memory leak: ==6439== 1,025 bytes in 1 blocks are definitely lost in loss record 95 of 132 ==6439== at 0x105E47B: malloc (vg_replace_malloc.c:236) ==6439== by 0x1BCEA42: ??? (localtime.c:414) ==6439== by 0x1BCF41A: ??? (localtime.c:1253) ==6439== by 0x1BCF7F3: localtime_r (localtime.c:1482) ==6439== by 0x41F9F7: get_log_timestamp (errlog.c:454) ==6439== by 0x41FF90: log_error (errlog.c:690) ==6439== by 0x41F646: show_version (errlog.c:199) ==6439== by 0x42D204: main (jcc.c:3036) Fix: The attached patch seems to fix it for me. Patch attached with submission follows: How-To-Repeat: Use valgrind with an application that uses (for example) localtime_r().
State Changed From-To: open->patched Fixed in HEAD.
Author: trociny Date: Sun Oct 30 08:35:19 2011 New Revision: 226929 URL: http://svn.freebsd.org/changeset/base/226929 Log: MFC r226828: Fix a memory leak in tzload(). PR: bin/161425 Reviewed by: kib Approved by: re (kib) Modified: stable/9/contrib/tzcode/stdtime/localtime.c Directory Properties: stable/9/contrib/tzcode/ (props changed) stable/9/contrib/tzcode/stdtime/ (props changed) stable/9/contrib/tzcode/zic/ (props changed) Modified: stable/9/contrib/tzcode/stdtime/localtime.c ============================================================================== --- stable/9/contrib/tzcode/stdtime/localtime.c Sun Oct 30 05:06:14 2011 (r226928) +++ stable/9/contrib/tzcode/stdtime/localtime.c Sun Oct 30 08:35:19 2011 (r226929) @@ -450,6 +450,7 @@ register const int doextend; _close(fid); return -1; } + free(fullname); } u = malloc(sizeof(*u)); if (u == NULL) _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
State Changed From-To: patched->closed Fixed in stable/9.