diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2012-06-29 15:40:40 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2012-06-29 15:40:40 +0200 |
commit | 40334847b685e6058be562b4436f72426637f4d8 (patch) | |
tree | b312baf018722872c5116e40b3aec891e513f0ca /tools/syslogd.c | |
parent | 7e7ee674bed138a19e8b7bdf962e1df5ae28128b (diff) | |
parent | 5a993ad7425bce33380ff10308f2ae93dadf8dae (diff) | |
download | rsyslog-40334847b685e6058be562b4436f72426637f4d8.tar.gz rsyslog-40334847b685e6058be562b4436f72426637f4d8.tar.bz2 rsyslog-40334847b685e6058be562b4436f72426637f4d8.zip |
Merge branch 'master-module'
Diffstat (limited to 'tools/syslogd.c')
-rw-r--r-- | tools/syslogd.c | 27 |
1 files changed, 5 insertions, 22 deletions
diff --git a/tools/syslogd.c b/tools/syslogd.c index b84aae22..20a4aa12 100644 --- a/tools/syslogd.c +++ b/tools/syslogd.c @@ -786,18 +786,6 @@ static void doDie(int sig) } -/* This function frees all dynamically allocated memory for program termination. - * It must be called only immediately before exit(). It is primarily an aid - * for memory debuggers, which prevents cluttered outupt. - * rgerhards, 2008-03-20 - */ -static void -freeAllDynMemForTermination(void) -{ - free(ourConf->globals.pszConfDAGFile); -} - - /* Finalize and destruct all actions. */ static inline void @@ -867,14 +855,16 @@ die(int sig) destructAllActions(); DBGPRINTF("all primary multi-thread sources have been terminated - now doing aux cleanup...\n"); + + DBGPRINTF("destructing current config...\n"); + rsconf.Destruct(&runConf); + /* rger 2005-02-22 * now clean up the in-memory structures. OK, the OS * would also take care of that, but if we do it * ourselfs, this makes finding memory leaks a lot * easier. */ - tplDeleteAll(runConf); - /* de-init some modules */ modExitIminternal(); @@ -898,15 +888,8 @@ die(int sig) /* dbgClassExit MUST be the last one, because it de-inits the debug system */ dbgClassExit(); - /* free all remaining memory blocks - this is not absolutely necessary, but helps - * us keep memory debugger logs clean and this is in aid in developing. It doesn't - * cost much time, so we do it always. -- rgerhards, 2008-03-20 - */ - freeAllDynMemForTermination(); - /* NO CODE HERE - feeelAllDynMemForTermination() must be the last thing before exit()! */ - + /* NO CODE HERE - dbgClassExit() must be the last thing before exit()! */ remove_pid(PidFile); - exit(0); /* "good" exit, this is the terminator function for rsyslog [die()] */ } |