Merge "func_periodic_hook.c: Cleanup module resources on failure."