Hi,
When I compile and ran net-snmp-5.2.1 SNMP agent with purify option in red hat. Memory was leaked in following places.
File: agent/mibgroup/disman/mteTriggerTable.c (1 byte of leak)
In create_mteTriggerTable_data() function
> line: StorageNew->mteTriggerThresholdObjects = strdup("");
File: agent/mibgroup/disman/mteTriggerTable.c (11 bytes of leak)
In parse_simple_monitor() function
> line: StorageNew->mteOwner = strdup("snmpd.conf");
File: agent/mibgroup/disman/mteTriggerTable.c (16 bytes of leak)
In create_mteTriggerTable_data() function
> line: StorageNew->mteTriggerValueID = calloc(1, sizeof(oid) * sizeof(2));
File: agent/mibgroup/disman/mteTriggerTable.c (36 bytes of leak)
In create_mteTriggerTable_data() function
>line: memdup((unsigned char **)
&(StorageNew->mteTriggerDeltaDiscontinuityID),
(unsigned char *) sysUpTimeInstance, sizeof(sysUpTimeInstance));
File: agent/mibgroup/disman/mteTriggerTable.c (400 bytes of leake )
In create_mteTriggerTable_data() function
>line: StorageNew = SNMP_MALLOC_STRUCT (mteTriggerTable_data);
Amount of leak:
If snmpd runs for 10 Minutes with out any get/set request passed to agent following amount of leak observed.
1 byte ( 52 times ) : 52 bytes
11 bytes ( 2 times ) : 22 bytes
16 bytes ( 2 times ) : 32 bytes
36 bytes ( 2 times ) : 72 bytes
400 bytes ( 2 times) : 800 bytes
--------------------------------------------------
Total leak : 978 bytes
--------------------------------------------------
Is this memory leak is fixed in latest versions?
Santhosh
_______________________________________________ Net-snmp-coders mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
