summaryrefslogtreecommitdiffstats
path: root/plugins/imfile
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-03-20 09:31:05 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2008-03-20 09:31:05 +0000
commit06ffec1c3f9e566993d372cc686c8ae7307c5de0 (patch)
tree5bbc3fe7bec322540318ec2d2a564c5f09c48b71 /plugins/imfile
parenta00b06ea93a91f784cf8b41fc493e589a14a80b4 (diff)
downloadrsyslog-06ffec1c3f9e566993d372cc686c8ae7307c5de0.tar.gz
rsyslog-06ffec1c3f9e566993d372cc686c8ae7307c5de0.tar.xz
rsyslog-06ffec1c3f9e566993d372cc686c8ae7307c5de0.zip
bugfix: fixed some minor memory leaks
Diffstat (limited to 'plugins/imfile')
-rw-r--r--plugins/imfile/imfile.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/imfile/imfile.c b/plugins/imfile/imfile.c
index ea1b03ad..a6e019d6 100644
--- a/plugins/imfile/imfile.c
+++ b/plugins/imfile/imfile.c
@@ -408,11 +408,13 @@ static rsRetVal resetConfigVariables(uchar __attribute__((unused)) *pp, void __a
/* add a new monitor */
-static rsRetVal addMonitor(void __attribute__((unused)) *pVal, uchar __attribute__((unused)) *pNewVal)
+static rsRetVal addMonitor(void __attribute__((unused)) *pVal, uchar *pNewVal)
{
DEFiRet;
fileInfo_t *pThis;
+ free(pNewVal); /* we do not need it, but we must free it! */
+
if(iFilPtr < MAX_INPUT_FILES) {
pThis = &files[iFilPtr];
/* TODO: check for strdup() NULL return */