nopnop2002 / esp-idf-mqtt-broker

MQTT Broker for esp-idf
MIT License
133 stars 33 forks source link

Memory leak found in event handler function #35

Closed jalpanparekh closed 3 years ago

jalpanparekh commented 3 years ago

Hi,

We have found memory leak in Event Handler Function fn() in mqtt_server.c. Where mg_strdup() function allocate memory and didn't release it for sub->topic.ptr.

Can you please confirm once if I misunderstood.

Thanks, Jalpan Parekh

nopnop2002 commented 3 years ago

Thank you for reporting.

I also check.

nopnop2002 commented 3 years ago

I fixed a memory leak in the latest version.

jalpanparekh commented 3 years ago

Thanks for the quick reply. I will check your latest patch.