diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-03-20 17:58:32 +0000 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-03-20 17:58:32 +0000 |
commit | c7d0e41cb85264a7663d50fa86c0ea461319968a (patch) | |
tree | 1ab5b7e1486bce2cfd7461346c2cfae674f80fff /debug.c | |
parent | 66df5a6c218cbac7a87d265cb195f74c8a812bc2 (diff) | |
download | rsyslog-c7d0e41cb85264a7663d50fa86c0ea461319968a.tar.gz rsyslog-c7d0e41cb85264a7663d50fa86c0ea461319968a.tar.bz2 rsyslog-c7d0e41cb85264a7663d50fa86c0ea461319968a.zip |
made debug module free some memory on exit to make memory debugger happy
Diffstat (limited to 'debug.c')
-rw-r--r-- | debug.c | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -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: |