espressif / esp-modbus

ESP-Modbus - the officially suppported library for Modbus protocol (serial RS485 + TCP over WiFi or Ethernet).
Apache License 2.0
85 stars 46 forks source link

Memory leak in vMBMasterPortEventClose (IDFGH-11055) #36

Closed dnebrich closed 9 months ago

dnebrich commented 10 months ago

Hi,

Appears to be a copy/paste error causing a memory leak on mbc_master_destroy. xQueueMasterHdl is used in the first if block instead of xEventGroupMasterHdl and then is set to NULL.

https://github.com/espressif/esp-modbus/blob/d311198e269feac3e65d04193b6baa29101b4cbf/freemodbus/port/portevent_m.c#L295-L313

Thanks.

alisitsyn commented 10 months ago

Hi @dnebrich,

Thank you for the issue. Don't know how it was happened. the issue confirmed and will be fixed in next release.

alisitsyn commented 9 months ago

Merged in v1.0.12 with commit 38f64e52997842850a8c182aec41f4994dd180f5