summaryrefslogtreecommitdiffstats
path: root/plugins/omsnmp/omsnmp.c
diff options
context:
space:
mode:
authorAndre Lorbach <alorbach@adiscon.com>2008-02-11 14:50:25 +0000
committerAndre Lorbach <alorbach@adiscon.com>2008-02-11 14:50:25 +0000
commitad55b12ac9e9162c2fff77072ab3d56e4637c788 (patch)
treee8f36d7ba33f67f2f9e4b6fd2a7d67e2b99eb3ae /plugins/omsnmp/omsnmp.c
parentde41d0b857eeee7e5fbf630efdb3d1976207e438 (diff)
downloadrsyslog-ad55b12ac9e9162c2fff77072ab3d56e4637c788.tar.gz
rsyslog-ad55b12ac9e9162c2fff77072ab3d56e4637c788.tar.xz
rsyslog-ad55b12ac9e9162c2fff77072ab3d56e4637c788.zip
Fixed minor bug finalize_it, pdu only needs to be cleaned if snmp_send
failed. Also added documentation to the omsnmp module.
Diffstat (limited to 'plugins/omsnmp/omsnmp.c')
-rw-r--r--plugins/omsnmp/omsnmp.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/omsnmp/omsnmp.c b/plugins/omsnmp/omsnmp.c
index cd3d589a..c559dbc8 100644
--- a/plugins/omsnmp/omsnmp.c
+++ b/plugins/omsnmp/omsnmp.c
@@ -250,10 +250,13 @@ static rsRetVal omsnmp_sendsnmp(instanceData *pData, uchar *psz)
/* TODO! CLEANUP */
ABORT_FINALIZE(RS_RET_ERR);
}
+ else /* Reset pdu Pointer, already cleaned */
+ pdu = NULL;
finalize_it:
if(pdu != NULL) {
snmp_free_pdu(pdu);
+ dbgprintf( "omsnmp_sendsnmp: called snmp_free_pdu - manually freeing memory for pdu\n");
}
if(ss != NULL) {