summaryrefslogtreecommitdiffstats
path: root/modules.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2007-08-09 13:23:17 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2007-08-09 13:23:17 +0000
commit8940c4125501cc7e28b38c00620c463499333dca (patch)
treeb580447b61ff98f2e9a7a074f752b29689bb69e5 /modules.c
parent2b5dc260a55b81f4a991254f1b7549342a11db0b (diff)
downloadrsyslog-8940c4125501cc7e28b38c00620c463499333dca.tar.gz
rsyslog-8940c4125501cc7e28b38c00620c463499333dca.tar.xz
rsyslog-8940c4125501cc7e28b38c00620c463499333dca.zip
fixed a potential memory leak in modules.c, again, this could not happen in
current code
Diffstat (limited to 'modules.c')
-rw-r--r--modules.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/modules.c b/modules.c
index 6e4d0395..18a7cdd9 100644
--- a/modules.c
+++ b/modules.c
@@ -67,6 +67,8 @@ static rsRetVal moduleConstruct(modInfo_t **pThis)
*/
static void moduleDestruct(modInfo_t *pThis)
{
+ if(pThis->pszName != NULL)
+ free(pThis->pszName);
free(pThis);
}
@@ -163,7 +165,7 @@ modInfo_t *omodGetNxt(modInfo_t *pThis)
/* Add an already-loaded module to the module linked list. This function does
- * anything that is needed to fully initialize the module.
+ * everything needed to fully initialize the module.
*/
rsRetVal doModInit(rsRetVal (*modInit)(int, int*, rsRetVal(**)(), rsRetVal(*)()), uchar *name)
{