<p>Richard Mudgett has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/7194">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">frame.c: Make ast_frame_free()/ast_frfree() NULL tolerant<br><br>Change-Id: Ic49d821ef88ada38a31bdd835b9531443c55d793<br>---<br>M main/frame.c<br>1 file changed, 4 insertions(+), 6 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/94/7194/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/main/frame.c b/main/frame.c<br>index c24cc8f..8a151ef 100644<br>--- a/main/frame.c<br>+++ b/main/frame.c<br>@@ -163,18 +163,16 @@<br> {<br> struct ast_frame *next;<br> <br>- for (next = AST_LIST_NEXT(frame, frame_list);<br>- frame;<br>- frame = next, next = frame ? AST_LIST_NEXT(frame, frame_list) : NULL) {<br>+ while (frame) {<br>+ next = AST_LIST_NEXT(frame, frame_list);<br> __frame_free(frame, cache);<br>+ frame = next;<br> }<br> }<br> <br> void ast_frame_dtor(struct ast_frame *f)<br> {<br>- if (f) {<br>- ast_frfree(f);<br>- }<br>+ ast_frfree(f);<br> }<br> <br> /*!<br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/7194">change 7194</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/7194"/><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: newchange </div>
<div style="display:none"> Gerrit-Change-Id: Ic49d821ef88ada38a31bdd835b9531443c55d793 </div>
<div style="display:none"> Gerrit-Change-Number: 7194 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Richard Mudgett <rmudgett@digium.com> </div>