r30113 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r30112‎ | r30113 | r30114 >
Date:11:32, 24 January 2008
Author:avar
Status:old
Tags:
Comment:
Free the bdb databases before exiting the program, this fixes the
following problem reported by valgrind:

==8746== 8,380 bytes in 2 blocks are definitely lost in loss record 2 of 3
==8746== at 0x4A1B858: malloc (vg_replace_malloc.c:149)
==8746== by 0x4BDC95B: __os_malloc (in /usr/lib/libdb-4.3.so)
==8746== by 0x4BB0F18: __db_shalloc (in /usr/lib/libdb-4.3.so)
==8746== by 0x4BD35E8: __memp_alloc (in /usr/lib/libdb-4.3.so)
==8746== by 0x4BD4AE0: __memp_fget (in /usr/lib/libdb-4.3.so)
==8746== by 0x4B48103: __bam_read_root (in /usr/lib/libdb-4.3.so)
==8746== by 0x4BA901A: __db_open (in /usr/lib/libdb-4.3.so)
==8746== by 0x4BA3A7D: __db_open_pp (in /usr/lib/libdb-4.3.so)
==8746== by 0x40150F: initEmptyDB (collector.c:170)
==8746== by 0x401124: main (collector.c:84)
Modified paths:
  • /trunk/webstatscollector/collector.c (modified) (history)

Diff [purge]

Index: trunk/webstatscollector/collector.c
@@ -117,6 +117,10 @@
118118 handleConnection(r);
119119 }
120120 }
 121+
 122+ db->close(db, 0);
 123+ aggr->close(aggr, 0);
 124+
121125 return(0);
122126 }
123127

Status & tagging log