diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2007-08-09 13:23:17 +0000 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2007-08-09 13:23:17 +0000 |
commit | 8940c4125501cc7e28b38c00620c463499333dca (patch) | |
tree | b580447b61ff98f2e9a7a074f752b29689bb69e5 /modules.c | |
parent | 2b5dc260a55b81f4a991254f1b7549342a11db0b (diff) | |
download | rsyslog-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.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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) { |