diff options
author | Corey Farrell <git@cfware.com> | 2017-11-21 21:34:56 -0500 |
---|---|---|
committer | Corey Farrell <git@cfware.com> | 2017-12-15 10:44:26 -0500 |
commit | 4de95d4bf0bbaf1cc47a2b907dd24cc6ca0afa6b (patch) | |
tree | 113e089ca2cb5cb075fc7af244a72b49a30f7cda /Makefile.rules | |
parent | 7377927b18118fcf5307e565daa3cb8dd819e26e (diff) |
loader: Minor fix to module registration.
This protects the module loader itself against crashing if dlopen is
called on a module from outside loader.c.
* Expand scope of lock inside ast_module_register to include reading of
resource_being_loaded.
* NULL check resource_being_loaded.
* Set resource_being_loaded NULL as soon as dlopen returns. This fixes
some error paths where it was not NULL'ed.
* Create module_destroy function to deduplicate code from
ast_module_unregister and modules_shutdown.
* Resolve leak that occured if a module did not successfully register.
* Simplify checking for successful registration.
Change-Id: I40f07a315e55b92df4fc7faf525ed6d4f396e7d2
Diffstat (limited to 'Makefile.rules')
0 files changed, 0 insertions, 0 deletions