I think there is a memory leak in esp_tls

octavio.santana
Posts: 5
Joined: Wed Mar 08, 2023 5:08 am

I think there is a memory leak in esp_tls

Postby octavio.santana » Fri Jul 07, 2023 1:56 pm

Hi,

My application is using secure mqtt to connect, I am forcing network disconnections to check how application recovers, unfortunately,

I seems to have come across a memory leakage, or at least I think so.
not sure if it is a bug or I am doing something wrong,
I am using ESP-IDF v5.0
by my count when issuing esp_tls_conn_new_sync( ), it does allocate from heap around 28kB

I was expecting when issuing a esp_tls_conn_destroy(), i will get that memory back, but it is not the case, shall i expect memory back?

is it not freeing the memory? xPortGetFreeHeapSize() is not very reliable?

Thanks in Advance

octavio.santana
Posts: 5
Joined: Wed Mar 08, 2023 5:08 am

Re: I think there is a memory leak in esp_tls

Postby octavio.santana » Tue Jul 11, 2023 6:43 am

Hi,
False alarm, no memory leakage, I was overwriting pxTls setting it to NULL, thus loosing its allocated memory!

Sorry
O.

Who is online

Users browsing this forum: Majestic-12 [Bot] and 64 guests