<p>neels has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmo-mgw/+/15139">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">explicitly free codecs in mgcp_rtp_conn_cleanup()<br><br>There are allocated bits in conn->end.codecs[], free them.<br><br>This is not fixing a memleak, since mgcp_rtp_conn_cleanup() is currently only<br>called from mgcp_conn_free(), which soon after frees the conn; the conn serves<br>as talloc parent for the codec strings freed in this patch.<br><br>The rationale: it is better style to explicitly free them, to also guard<br>against future callers of mgcp_rtp_conn_cleanup() which might expect complete<br>cleanup.<br><br>Change-Id: Ic471107ce6e94d9ce582d887429c744ff93e3053<br>---<br>M src/libosmo-mgcp/mgcp_conn.c<br>1 file changed, 1 insertion(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/39/15139/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/libosmo-mgcp/mgcp_conn.c b/src/libosmo-mgcp/mgcp_conn.c</span><br><span>index 772584b..60a1700 100644</span><br><span>--- a/src/libosmo-mgcp/mgcp_conn.c</span><br><span>+++ b/src/libosmo-mgcp/mgcp_conn.c</span><br><span>@@ -129,6 +129,7 @@</span><br><span>               conn_osmux_disable(conn_rtp);</span><br><span>        mgcp_free_rtp_port(&conn_rtp->end);</span><br><span>   rate_ctr_group_free(conn_rtp->rate_ctr_group);</span><br><span style="color: hsl(120, 100%, 40%);">+     mgcp_codec_reset_all(conn_rtp);</span><br><span> }</span><br><span> </span><br><span> void mgcp_conn_watchdog_cb(void *data)</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-mgw/+/15139">change 15139</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.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.osmocom.org/c/osmo-mgw/+/15139"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-mgw </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: Ic471107ce6e94d9ce582d887429c744ff93e3053 </div>
<div style="display:none"> Gerrit-Change-Number: 15139 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: neels <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>