diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2007-12-11 16:26:22 +0000 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2007-12-11 16:26:22 +0000 |
commit | 3e95f0545729a43d4c0a7fe2b906783856db05fd (patch) | |
tree | ce014b46e3f33b8484bdd79b70c816c9553214f0 /action.c | |
parent | 3c79979b830ad0204ae47592fa858a996ce90b5e (diff) | |
download | rsyslog-3e95f0545729a43d4c0a7fe2b906783856db05fd.tar.gz rsyslog-3e95f0545729a43d4c0a7fe2b906783856db05fd.tar.xz rsyslog-3e95f0545729a43d4c0a7fe2b906783856db05fd.zip |
fixed a potential race condition, see link for details:
http://rgerhards.blogspot.com/2007/12/rsyslog-race-condition.html
Diffstat (limited to 'action.c')
-rw-r--r-- | action.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -34,6 +34,7 @@ #include "template.h" #include "action.h" #include "modules.h" +#include "sync.h" /* object static data (once for all instances) */ @@ -52,6 +53,7 @@ rsRetVal actionDestruct(action_t *pThis) if(pThis->f_pMsg != NULL) MsgDestruct(pThis->f_pMsg); + SYNC_OBJ_TOOL_EXIT(pThis); if(pThis->ppTpl != NULL) free(pThis->ppTpl); if(pThis->ppMsgs != NULL) @@ -77,6 +79,7 @@ rsRetVal actionConstruct(action_t **ppThis) } pThis->iResumeInterval = glbliActionResumeInterval; + SYNC_OBJ_TOOL_INIT(pThis); finalize_it: *ppThis = pThis; |