summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorAndre Lorbach <alorbach@adiscon.com>2008-02-11 09:54:20 +0000
committerAndre Lorbach <alorbach@adiscon.com>2008-02-11 09:54:20 +0000
commita2785882aa50b5a8d7ff2a5f59a5eb995ad7491e (patch)
tree40179e3b895891368f36331095c4a956da327284 /plugins
parenta9cde36fdc0ddb3b4ed6358c4e953b362c68d97d (diff)
downloadrsyslog-a2785882aa50b5a8d7ff2a5f59a5eb995ad7491e.tar.gz
rsyslog-a2785882aa50b5a8d7ff2a5f59a5eb995ad7491e.tar.xz
rsyslog-a2785882aa50b5a8d7ff2a5f59a5eb995ad7491e.zip
Added missing variable checks in modExit and CODESTARTmodExit
Diffstat (limited to 'plugins')
-rw-r--r--plugins/omsnmp/omsnmp.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/plugins/omsnmp/omsnmp.c b/plugins/omsnmp/omsnmp.c
index 42b50433..2dce5791 100644
--- a/plugins/omsnmp/omsnmp.c
+++ b/plugins/omsnmp/omsnmp.c
@@ -450,7 +450,23 @@ static rsRetVal resetConfigVariables(uchar __attribute__((unused)) *pp, void __a
if (pszTarget != NULL)
free(pszTarget);
pszTarget = NULL;
+
+ if (pszCommunity != NULL)
+ free(pszCommunity);
+ pszCommunity = NULL;
+
+ if (pszEnterpriseOID != NULL)
+ free(pszEnterpriseOID);
+ pszEnterpriseOID = NULL;
+
+ if (pszSyslogMessageOID != NULL)
+ free(pszSyslogMessageOID);
+ pszSyslogMessageOID = NULL;
+
iPort = 0;
+ iSNMPVersion = 1;
+ iSpecificType = 0;
+ iTrapType = SNMP_TRAP_ENTERPRISESPECIFIC;
return RS_RET_OK;
}
@@ -460,6 +476,12 @@ BEGINmodExit
CODESTARTmodExit
if (pszTarget != NULL)
free(pszTarget);
+if (pszCommunity != NULL)
+ free(pszCommunity);
+if (pszEnterpriseOID != NULL)
+ free(pszEnterpriseOID);
+if (pszSyslogMessageOID != NULL)
+ free(pszSyslogMessageOID);
ENDmodExit