chunk mem leak, and undiagnose chunk code
This commit is contained in:
parent
c9190eee44
commit
30a479de68
3 changed files with 18 additions and 17 deletions
|
|
@ -710,18 +710,13 @@ chunk_check(FILE *fout, const char *name)
|
|||
chunk_group_t *grp = NULL;
|
||||
chunk_grpent_t *ent;
|
||||
|
||||
|
||||
if (!chunk_initialized)
|
||||
return;
|
||||
|
||||
|
||||
/* No name given, walk through everything
|
||||
*/
|
||||
if (name == (const char *)NULL) {
|
||||
|
||||
for (idx = 0; idx < CHUNK_HEADS; idx++) {
|
||||
chunk_head_t *chead = &chunk_heads[idx];
|
||||
|
||||
cnk = chead->ch_cnks;
|
||||
if (cnk == (chunk_t *)NULL)
|
||||
continue;
|
||||
|
|
@ -730,7 +725,7 @@ chunk_check(FILE *fout, const char *name)
|
|||
|
||||
/* If no file name it's an internal chunk */
|
||||
if (cnk->c_diag.cd_file)
|
||||
fprintf(fout ? fout : stdout,
|
||||
clicon_debug(0,
|
||||
"%s:%d,\t%zu bytes (%p), group \"%s\"\n",
|
||||
cnk->c_diag.cd_file,
|
||||
cnk->c_diag.cd_line,
|
||||
|
|
@ -786,4 +781,9 @@ chunk_check(FILE *fout, const char *name)
|
|||
} while (ent != grp->cg_ent);
|
||||
}
|
||||
}
|
||||
#else /* CHUNK_DIAG */
|
||||
void
|
||||
chunk_check(FILE *fout, const char *name)
|
||||
{
|
||||
}
|
||||
#endif /* CHUNK_DIAG */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue