diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2012-06-25 12:55:54 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2012-06-25 12:55:54 +0200 |
commit | c23ddc0aef3493cd7de31a6c43ee985f751a06cf (patch) | |
tree | 745afb9d0d84d6298950cf8b999f374f704cef56 | |
parent | bf85d81790a26945e404c6fdfdddad5eadbaa371 (diff) | |
download | rsyslog-c23ddc0aef3493cd7de31a6c43ee985f751a06cf.tar.gz rsyslog-c23ddc0aef3493cd7de31a6c43ee985f751a06cf.tar.xz rsyslog-c23ddc0aef3493cd7de31a6c43ee985f751a06cf.zip |
cleanup & fix of mini-leak
-rw-r--r-- | runtime/rsconf.c | 2 | ||||
-rw-r--r-- | tools/pidfile.c | 6 |
2 files changed, 3 insertions, 5 deletions
diff --git a/runtime/rsconf.c b/runtime/rsconf.c index affa2dd5..9ee13dd4 100644 --- a/runtime/rsconf.c +++ b/runtime/rsconf.c @@ -175,13 +175,11 @@ freeCnf(rsconf_t *pThis) /* destructor for the rsconf object */ BEGINobjDestruct(rsconf) /* be sure to specify the object type also in END and CODESTART macros! */ CODESTARTobjDestruct(rsconf) -dbgprintf("AAA: rsconfObjDesctruct called\n"); freeCnf(pThis); tplDeleteAll(pThis); free(pThis->globals.mainQ.pszMainMsgQFName); free(pThis->globals.pszConfDAGFile); llDestroy(&(pThis->rulesets.llRulesets)); -dbgprintf("AAA: rsconfObjDesctruct exit\n"); ENDobjDestruct(rsconf) diff --git a/tools/pidfile.c b/tools/pidfile.c index e7744513..e9601232 100644 --- a/tools/pidfile.c +++ b/tools/pidfile.c @@ -125,7 +125,7 @@ int write_pid (char *pidfile) char errStr[1024]; rs_strerror_r(errno, errStr, sizeof(errStr)); printf("Can't write pid , %s.\n", errStr); - close(fd); + fclose(f); return 0; } fflush(f); @@ -135,11 +135,11 @@ int write_pid (char *pidfile) char errStr[1024]; rs_strerror_r(errno, errStr, sizeof(errStr)); printf("Can't unlock pidfile %s, %s.\n", pidfile, errStr); - close(fd); + fclose(f); return 0; } #endif - close(fd); + fclose(f); return pid; } |