diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2007-09-04 13:20:07 +0000 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2007-09-04 13:20:07 +0000 |
commit | 79a68894b4f63d1684996718f7411e4163d76bba (patch) | |
tree | 4a945db849dd3aae7215d9ef084da53d91c0dfe0 /msg.c | |
parent | 5b17b10f432c9b7280624b14ae2f656a34a1a829 (diff) | |
download | rsyslog-79a68894b4f63d1684996718f7411e4163d76bba.tar.gz rsyslog-79a68894b4f63d1684996718f7411e4163d76bba.tar.xz rsyslog-79a68894b4f63d1684996718f7411e4163d76bba.zip |
applied patch form varmojfekoj to fix some mem leaks and a check to make
sure that an empty string (NULL) returned by the CStr class does not
cause a program abort.
Diffstat (limited to 'msg.c')
-rw-r--r-- | msg.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -126,6 +126,14 @@ void MsgDestruct(msg_t * pM) free(pM->pszTIMESTAMP_MySQL); if(pM->pszPRI != NULL) free(pM->pszPRI); + if(pM->pCSProgName != NULL) + rsCStrDestruct(pM->pCSProgName); + if(pM->pCSStrucData != NULL) + rsCStrDestruct(pM->pCSStrucData); + if(pM->pCSPROCID != NULL) + rsCStrDestruct(pM->pCSPROCID); + if(pM->pCSMSGID != NULL) + rsCStrDestruct(pM->pCSMSGID); free(pM); } MsgUnlock(); |