Readfile: avoid confusion when debugging a memory leak

This commit is contained in:
2022-09-09 13:16:13 +02:00
parent ac66a819c1
commit f15fecf0f7

View File

@@ -3065,7 +3065,11 @@ static BHead *read_data_into_datamap(FileData *fd, BHead *bhead, const char *all
* With the code below we get the struct-name to help tracking down the leak.
* This is kept disabled as the #malloc for the text always leaks memory. */
#if 0
{
if (bhead->SDNAnr == 0) {
/* The data type here is unclear because #writedata sets SDNAnr to 0. */
allocname = "likely raw data";
}
else {
SDNA_Struct *sp = fd->filesdna->structs[bhead->SDNAnr];
allocname = fd->filesdna->types[sp->type];
size_t allocname_size = strlen(allocname) + 1;