On Thu, 2 Dec 2004 14:36:09 +0100 P wrote:
PK> I have another bug in code generated by mfd.
It's not actually in the mfd code, it's higher up in the table_container code.
And it's actually two bugs. See if these patches help you:
diff -u -r5.31 table.c
--- agent/helpers/table.c 27 Sep 2004 19:06:53 -0000 5.31
+++ agent/helpers/table.c 7 Dec 2004 23:23:10 -0000
@@ -837,6 +840,11 @@
if (!tri)
return SNMPERR_GENERR;
+ /*
+ * free any existing allocated memory, then parse oid into varbinds
+ */
+ snmp_reset_var_buffers( tri->indexes);
+
return parse_oid_indexes(tri->index_oid, tri->index_oid_len,
tri->indexes);
}
diff -u -r5.6 snmp_client.c
--- snmplib/snmp_client.c 16 Sep 2004 17:34:18 -0000 5.6
+++ snmplib/snmp_client.c 7 Dec 2004 23:27:02 -0000
@@ -299,7 +299,8 @@
var->name_length = 0;
}
if (var->val.string != var->buf) {
- free(var->val.string);
+ if (NULL != var->val.string)
+ free(var->val.string);
var->val.string = var->buf;
var->val_len = 0;
}
--
Robert Story; NET-SNMP Junkie
Support: <http://www.net-snmp.org/> <irc://irc.freenode.net/#net-snmp>
Archive: <http://sourceforge.net/mailarchive/forum.php?forum=net-snmp-coders>
You are lost in a twisty maze of little standards, all different.
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
_______________________________________________
Net-snmp-coders mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders