mosquitto_auth_plugin_cleanup never called by mosquitto?
mosquitto_plugin.h says:
Function: mosquitto_auth_plugin_cleanup Called when the broker is shutting down. This will only ever be called once per plugin. Note that <mosquitto_auth_security_cleanup> will be called directly before this function.
but I didn't find any code in mosquitto for this. plugin->plugin_cleanup_v3 is assigned but never called.
mosquitto_auth_security_cleanup is called normally.
Did you have any actual failure in addition to the code review? Did your issue reproduce on plugin v3 only, or on any version?
Thanks for reporting this, it should be fixed in the fixes branch now. If you could confirm and close the issue if it works for you.