<p>Corey Farrell <strong>uploaded patch set #2</strong> to this change.</p><p><a href="https://gerrit.asterisk.org/7518">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">loader: Minor fix to module registration.<br><br>This protects the module loader itself against crashing if dlopen is<br>called on a module from outside loader.c.<br><br>* Expand scope of lock inside ast_module_register to include reading of<br>  resource_being_loaded.<br>* NULL check resource_being_loaded.<br>* Set resource_being_loaded NULL as soon as dlopen returns.  This fixes<br>  some error paths where it was not NULL'ed.<br>* Create module_destroy function to deduplicate code from<br>  ast_module_unregister and modules_shutdown.<br>* Resolve leak that occured if a module did not successfully register.<br>* Simplify checking for successful registration.<br><br>Change-Id: I40f07a315e55b92df4fc7faf525ed6d4f396e7d2<br>---<br>M main/loader.c<br>1 file changed, 57 insertions(+), 50 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/18/7518/2</pre><p>To view, visit <a href="https://gerrit.asterisk.org/7518">change 7518</a>. To unsubscribe, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/7518"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newpatchset </div>
<div style="display:none"> Gerrit-Change-Id: I40f07a315e55b92df4fc7faf525ed6d4f396e7d2 </div>
<div style="display:none"> Gerrit-Change-Number: 7518 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: Corey Farrell <git@cfware.com> </div>
<div style="display:none"> Gerrit-Reviewer: Corey Farrell <git@cfware.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Kevin Harwell <kharwell@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Richard Mudgett <rmudgett@digium.com> </div>