Closed nicksenva closed 1 year ago
@nicksenva ,
Thank you for this issue. The originally it supposed to be static semaphore. The code is updated as in the patch below and will be merged ASAP. 0001-fix-rx-sema-destroy.patch
Thank you for your quick response. For now we have applied a patch by moving our esp-modbus component out of our project's managed components folder. Is there any estimate when the next official release will include this patch?
I can not give you the concrete date of merge. However it will be merged as soon as other pending MRs are tested. I will try to do it ASAP. I will inform you once it is ready for merge.
The fix has been merged in commit 3f6537fc940c932884db43c9d62608e982461a70. The issue will be closed. Feel free to reopen.
Calling
mbc_master_init()
creates a binary semaphore for the receive buffer inxMBMasterPortRxSemaInit()
, which makes a dynamic memory allocation.mbc_master_destroy()
does not destroy this semaphore, resulting in a memory leak each time the Modbus master is re-initialized. This could be resolved by callingvSemaphoreDelete()
in the destroy function, or by creating a statically allocated semaphore.