summaryrefslogtreecommitdiffstats
path: root/action.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2011-12-16 18:54:59 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2011-12-16 18:54:59 +0100
commitbe2383f2b80d4fb83abd2765e6467e8d7614ab49 (patch)
treecfabc4b208d80f4d5903e537ecb5116e642c3423 /action.c
parent955312ebf5d59e2ed0d35ba624070439b9fc5273 (diff)
downloadrsyslog-be2383f2b80d4fb83abd2765e6467e8d7614ab49.tar.gz
rsyslog-be2383f2b80d4fb83abd2765e6467e8d7614ab49.tar.xz
rsyslog-be2383f2b80d4fb83abd2765e6467e8d7614ab49.zip
fixing memory leak in new stats code (delete statsobj)
Diffstat (limited to 'action.c')
-rw-r--r--action.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/action.c b/action.c
index 45fa6cf7..84b97e5c 100644
--- a/action.c
+++ b/action.c
@@ -265,6 +265,12 @@ rsRetVal actionDestruct(action_t *pThis)
qqueueDestruct(&pThis->pQueue);
}
+ /* destroy stats object, if we have one (may not always be
+ * be the case, e.g. if turned off)
+ */
+ if(pThis->statsobj != NULL)
+ statsobj.Destruct(&pThis->statsobj);
+
if(pThis->pMod != NULL)
pThis->pMod->freeInstance(pThis->pModData);