am 40107623: am 778a68e1: Merge "Don\'t free anything when reporting leaks."
* commit '40107623b05fdc2b6c61d9c885483abd3add486a': Don't free anything when reporting leaks.
This commit is contained in:
commit
c08ab018ad
@ -362,8 +362,6 @@ extern "C" void chk_free(void *ptr) {
|
|||||||
log_message("+++ ALLOCATION %p IS CORRUPTED OR NOT ALLOCATED VIA TRACKER!\n",
|
log_message("+++ ALLOCATION %p IS CORRUPTED OR NOT ALLOCATED VIA TRACKER!\n",
|
||||||
user(hdr));
|
user(hdr));
|
||||||
log_backtrace(gMapInfo, bt, depth);
|
log_backtrace(gMapInfo, bt, depth);
|
||||||
/* Leak here so that we do not crash */
|
|
||||||
//dlfree(user(hdr));
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
hdr->freed_bt_depth = get_backtrace(hdr->freed_bt,
|
hdr->freed_bt_depth = get_backtrace(hdr->freed_bt,
|
||||||
@ -459,14 +457,12 @@ static void heaptracker_free_leaked_memory() {
|
|||||||
/* safe == 1, because the allocation is valid */
|
/* safe == 1, because the allocation is valid */
|
||||||
log_backtrace(gMapInfo, del->bt, del->bt_depth);
|
log_backtrace(gMapInfo, del->bt, del->bt_depth);
|
||||||
}
|
}
|
||||||
dlfree(del);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// log_message("+++ DELETING %d BACKLOGGED ALLOCATIONS\n", backlog_num);
|
// log_message("+++ DELETING %d BACKLOGGED ALLOCATIONS\n", backlog_num);
|
||||||
while (backlog_head) {
|
while (backlog_head) {
|
||||||
del = backlog_tail;
|
del = backlog_tail;
|
||||||
del_from_backlog(del);
|
del_from_backlog(del);
|
||||||
dlfree(del);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user