func_periodic_hook.c: Cleanup module resources on failure.
authorRichard Mudgett <rmudgett@digium.com>
Thu, 4 Oct 2018 18:13:24 +0000 (13:13 -0500)
committerRichard Mudgett <rmudgett@digium.com>
Thu, 4 Oct 2018 19:38:52 +0000 (14:38 -0500)
commitc6c3a63696d3bae1bb04099f900dc12e8f552026
tree15d174f61377ee441116f3ee96ff8c4cb60c690f
parent30717bafbfd6bb9b0dc158447b4ac0b8937e7826
func_periodic_hook.c: Cleanup module resources on failure.

* Make load_module() cleanup if it failed to setup the module.

* Make unload_module() always return 0.  It is silly to fail unloading if
the hook function we try to unregister was not even registered.

Change-Id: I280fc6e8ba2a7ee2588ca01d870eebaf74b4ffe6
funcs/func_periodic_hook.c