snmp_set_var_value function question
"Andrey Kamchatnikov" <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <001c01c83e5d$e46f9e20$de34a8c0@andrey> |
Hi,
I run snmpd on uClinux. Sometimes it crashes. I have found a place, where this problem has occured.
In snmp_set_var_value function (snmp_client.c)
..........................
/*
* xxx-rks: why the unconditional free? why not use existing
* memory, if len < vars->val_len ?
*/
if (vars->val.string && vars->val.string != vars->buf) {
free(vars->val.string);
}
Sometimes snmpd tries to free allocated memory here, which was not allocated.
It is not clear for me why it happened and why this condition (vars->val.string && vars->val.string != vars->buf)
is true.
thank you,
Andrey
-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users