lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [bug #59032] Possible memory leak


From: Ondrej Lufinka
Subject: [lwip-devel] [bug #59032] Possible memory leak
Date: Fri, 28 Aug 2020 09:09:05 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.135 Safari/537.36

URL:
  <https://savannah.nongnu.org/bugs/?59032>

                 Summary: Possible memory leak
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: ondrej_lufinka
            Submitted on: Fri 28 Aug 2020 01:09:03 PM UTC
                Category: Platform ports
                Severity: 3 - Normal
              Item Group: Faulty Behaviour
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: None
            lwIP version: git head

    _______________________________________________________

Details:

I use LwIP on STM32 MCU. I have a working combination of LwIP + MbedTLS +
MQTT. I found a possible memory leak in function
altcp_tls_create_config_client_2wayauth. Inside the function
mbedtls_ssl_conf_own_cert there is line:

new_cert = mbedtls_calloc( 1, sizeof( mbedtls_ssl_key_cert ) );

which allocates new memory. This memory is never released. When I added line:

mbedtls_free(conf->conf.key_cert);

to the altcp_tls_free_config function, the memory leak is gone.




    _______________________________________________________

Reply to this item at:

  <https://savannah.nongnu.org/bugs/?59032>

_______________________________________________
  Message sent via Savannah
  https://savannah.nongnu.org/




reply via email to

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