From c7d0e41cb85264a7663d50fa86c0ea461319968a Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Thu, 20 Mar 2008 17:58:32 +0000 Subject: made debug module free some memory on exit to make memory debugger happy --- debug.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/debug.c b/debug.c index 74dffe9f..39e7fc4f 100644 --- a/debug.c +++ b/debug.c @@ -1304,6 +1304,7 @@ finalize_it: rsRetVal dbgClassExit(void) { + dbgFuncDBListEntry_t *pFuncDBListEtry, *pToDel; pthread_key_delete(keyCallStack); if(bPrintAllDebugOnExit) @@ -1311,6 +1312,18 @@ rsRetVal dbgClassExit(void) if(altdbg != NULL) fclose(altdbg); + + /* now free all of our memory to make the memory debugger happy... */ + pFuncDBListEtry = pFuncDBListRoot; + while(pFuncDBListEtry != NULL) { + pToDel = pFuncDBListEtry; + pFuncDBListEtry = pFuncDBListEtry->pNext; + free(pToDel->pFuncDB->file); + free(pToDel->pFuncDB->func); + free(pToDel->pFuncDB); + free(pToDel); + } + return RS_RET_OK; } /* vi:set ai: -- cgit