summaryrefslogtreecommitdiffstats
path: root/msg.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2007-09-04 13:20:07 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2007-09-04 13:20:07 +0000
commit79a68894b4f63d1684996718f7411e4163d76bba (patch)
tree4a945db849dd3aae7215d9ef084da53d91c0dfe0 /msg.c
parent5b17b10f432c9b7280624b14ae2f656a34a1a829 (diff)
downloadrsyslog-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.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/msg.c b/msg.c
index be3c48ae..80cdb09e 100644
--- a/msg.c
+++ b/msg.c
@@ -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();