summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/map/map.c6
-rw-r--r--src/map/map.h4
2 files changed, 7 insertions, 3 deletions
diff --git a/src/map/map.c b/src/map/map.c
index 2428cc6e2..71af45530 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -290,13 +290,15 @@ int map_freeblock_lock (void)
* バッファにたまっていたblockを全部削除
*------------------------------------------
*/
-int map_freeblock_unlock (void)
+//int map_freeblock_unlock (void)
+int map_freeblock_unlock_sub(char *file, int lineno)
{
if ((--block_free_lock) == 0) {
int i;
for (i = 0; i < block_free_count; i++)
{ //Directly calling aFree shouldn't be a leak, as Free remembers the size the original pointed to memory was allocated with? [Skotlex]
- aFree(block_free[i]);
+// aFree(block_free[i]);
+ _mfree(block_free[i], file, lineno, __func__);
block_free[i] = NULL;
}
block_free_count = 0;
diff --git a/src/map/map.h b/src/map/map.h
index 071bec81c..d299e32c0 100644
--- a/src/map/map.h
+++ b/src/map/map.h
@@ -1278,7 +1278,9 @@ int map_getusers(void);
// block削除関連
int map_freeblock(struct block_list *bl);
int map_freeblock_lock(void);
-int map_freeblock_unlock(void);
+//int map_freeblock_unlock(void);
+int map_freeblock_unlock_sub (char *file, int lineno);
+#define map_freeblock_unlock() map_freeblock_unlock_sub (__FILE__, __LINE__)
// block関連
int map_addblock_sub(struct block_list *, int);
int map_delblock_sub(struct block_list *, int);