<p>Richard Mudgett <strong>posted comments</strong> on this change.</p><p><a href="https://gerrit.asterisk.org/5919">View Change</a></p><p>Patch set 2:</p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><p style="white-space: pre-wrap; word-wrap: break-word;">I'm worrying that on destroying dialog we will not always remove it<br>from a dialog associations container.</p></blockquote><p style="white-space: pre-wrap; word-wrap: break-word;">There are several mitigating factors to reduce that kind of problem:</p><ul><li>We do clear out the endpoint and the serializer from the dialog when the dialog is to be destroyed.  When both are cleared we remove the object from the container.  ast_sip_dialog_set_serializer() and ast_sip_dialog_set_endpoint() are always called together by existing code to store and clear the pointers.</li></ul><ul><li>If it were somehow not removed from the container, only the small distributor_dialog_data object is leaked since it does not hold serializer or endpoint references.</li></ul><ul><li>Since the container key is the dialog pointer, the object can even be "reclaimed" if later on another dialog gets created at the same memory location.</li></ul><ul style="list-style: none; padding-left: 20px;"></ul><p>To view, visit <a href="https://gerrit.asterisk.org/5919">change 5919</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/5919"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 13 </div>
<div style="display:none"> Gerrit-MessageType: comment </div>
<div style="display:none"> Gerrit-Change-Id: I9ed63f4da9649e9db6ed4be29c360968917a89bd </div>
<div style="display:none"> Gerrit-Change-Number: 5919 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: Richard Mudgett <rmudgett@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Alexei Gradinari <alex2grad@gmail.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: Richard Mudgett <rmudgett@digium.com> </div>
<div style="display:none"> Gerrit-Comment-Date: Fri, 30 Jun 2017 21:58:57 +0000 </div>
<div style="display:none"> Gerrit-HasComments: No </div>