http://www.mediawiki.org/wiki/Special:Code/MediaWiki/71847
Revision: 71847
Author: platonides
Date: 2010-08-28 08:13:38 +0000 (Sat, 28 Aug 2010)
Log Message:
-----------
Follow up r71805
Modified Paths:
--------------
trunk/extensions/PoolCounter/daemon/locks.c
Modified: trunk/extensions/PoolCounter/daemon/locks.c
===================================================================
--- trunk/extensions/PoolCounter/daemon/locks.c 2010-08-28 02:33:07 UTC (rev
71846)
+++ trunk/extensions/PoolCounter/daemon/locks.c 2010-08-28 08:13:38 UTC (rev
71847)
@@ -1,3 +1,4 @@
+#define _XOPEN_SOURCE 500
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
@@ -49,7 +50,7 @@
fprintf(stderr, "Out of memory\n");
return "ERROR OUT_OF_MEMORY\n";
}
- pCounter->htentry.key = key;
+ pCounter->htentry.key = strdup( key );
pCounter->htentry.key_hash = hash_value;
pCounter->count = 0;
pCounter->processing = 0;
@@ -146,6 +147,7 @@
l->parent->count--;
if ( !l->parent->count ) {
hashtable_remove( l->parent->htentry.parent_hashtable,
&l->parent->htentry );
+ free( l->parent->htentry.key );
free( l->parent );
}
}
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs