<p>Joshua Colp <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/7660">View Change</a></p><div style="white-space:pre-wrap">Approvals:
George Joseph: Looks good to me, but someone else must approve
Sean Bright: Looks good to me, approved
Joshua Colp: Approved for Submit
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">core: Fix multiple trivial issues in the core.<br><br>* Fix small leaks in from error condition in translate.c.<br>* Check new file descriptor is less than 0, not less than or equal.<br><br>Change-Id: Id7782775486175c739e0c4bf3ea5e17e3f452a99<br>---<br>M main/translate.c<br>M main/utils.c<br>2 files changed, 3 insertions(+), 4 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/main/translate.c b/main/translate.c<br>index 4ffe27c..0721f07 100644<br>--- a/main/translate.c<br>+++ b/main/translate.c<br>@@ -499,6 +499,7 @@<br> ast_log(LOG_WARNING, "No translator path from %s to %s\n",<br> ast_format_get_name(src), ast_format_get_name(dst));<br> AST_RWLIST_UNLOCK(&translators);<br>+ ast_translator_free_path(head);<br> return NULL;<br> }<br> if ((t->dst_codec.sample_rate == ast_format_get_sample_rate(dst)) && (t->dst_codec.type == ast_format_get_type(dst))) {<br>@@ -507,9 +508,7 @@<br> if (!(cur = newpvt(t, explicit_dst))) {<br> ast_log(LOG_WARNING, "Failed to build translator step from %s to %s\n",<br> ast_format_get_name(src), ast_format_get_name(dst));<br>- if (head) {<br>- ast_translator_free_path(head);<br>- }<br>+ ast_translator_free_path(head);<br> AST_RWLIST_UNLOCK(&translators);<br> return NULL;<br> }<br>diff --git a/main/utils.c b/main/utils.c<br>index 0b8dc7a..b4ecffd 100644<br>--- a/main/utils.c<br>+++ b/main/utils.c<br>@@ -2664,7 +2664,7 @@<br> unsigned char full_mac[6] = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF};<br> <br> s = socket(AF_INET, SOCK_STREAM, 0);<br>- if (s <= 0) {<br>+ if (s < 0) {<br> ast_log(LOG_WARNING, "Unable to open socket for seeding global EID. "<br> "You will have to set it manually.\n");<br> return;<br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/7660">change 7660</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/7660"/><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: merged </div>
<div style="display:none"> Gerrit-Change-Id: Id7782775486175c739e0c4bf3ea5e17e3f452a99 </div>
<div style="display:none"> Gerrit-Change-Number: 7660 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Corey Farrell <git@cfware.com> </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.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: Sean Bright <sean.bright@gmail.com> </div>