lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-devel] [bug #48330] Memory leak in snmp_send_trap function


From: Sergio R. Caprile
Subject: [lwip-devel] [bug #48330] Memory leak in snmp_send_trap function
Date: Tue, 28 Jun 2016 16:51:00 +0000 (UTC)
User-agent: Mozilla/5.0 (Windows NT 6.1; rv:43.0) Gecko/20100101 Firefox/43.0

Follow-up Comment #1, bug #48330 (project lwip):

AFAIU, you are right. Do you mean like this: (patch attached) ?

diff --git a/src/apps/snmp/snmp_traps.c b/src/apps/snmp/snmp_traps.c
index 3da2dca..1ca7d28 100644
--- a/src/apps/snmp/snmp_traps.c
+++ b/src/apps/snmp/snmp_traps.c
@@ -192,6 +192,7 @@ snmp_send_trap(const struct snmp_obj_id
*device_enterprise_o

           /** send to the TRAP destination */
           snmp_sendto(snmp_traps_handle, p, &td->dip, SNMP_TRAP_PORT);
+          pbuf_free(p);
         } else {
           err = ERR_MEM;
         }


(file #37613)
    _______________________________________________________

Additional Item Attachment:

File name: snmpatch.txt                   Size:0 KB


    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?48330>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]