Merge branch 'master' of git.sv.gnu.org:/srv/git/lwip

This commit is contained in:
Simon Goldschmidt
2014-09-05 21:13:03 +02:00
2 changed files with 7 additions and 0 deletions

View File

@@ -110,6 +110,10 @@ snmp_error_response(struct snmp_msg_pstat *msg_ps, u8_t error)
struct snmp_varbind *vbi = msg_ps->invb.head;
struct snmp_varbind *vbo = msg_ps->outvb.head;
for (v=0; v<msg_ps->vb_idx; v++) {
if (vbi->ident != NULL) {
/* free previously allocated value before overwriting the pointer */
memp_free(MEMP_SNMP_VALUE, vbi->ident);
}
vbi->ident_len = vbo->ident_len;
vbo->ident_len = 0;
vbi->ident = vbo->ident;