freemodbus: fix event processing failure after destroy
freemodbus: fix event processing failure after destroy

Closes https://github.com/espressif/esp-idf/issues/5275

espressif/esp-idf,espressif/esp-idf,espressif/esp-idf,espressif/esp-idf