<p>fixeria has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmo-hlr/+/21182">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">USSD: fix handle_ussd(): do not free() unconditionally<br><br>An internal handler may want to continue session, e.g. to request<br>more information from the MS, so we should check the session<br>state before calling ss_session_free().<br><br>Change-Id: I49262e7fe26f29dedbf126087cfb8f3bb3c548dc<br>---<br>M src/hlr_ussd.c<br>1 file changed, 3 insertions(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/82/21182/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/hlr_ussd.c b/src/hlr_ussd.c</span><br><span>index 25e9354..f7f8062 100644</span><br><span>--- a/src/hlr_ussd.c</span><br><span>+++ b/src/hlr_ussd.c</span><br><span>@@ -496,8 +496,9 @@</span><br><span>             } else {</span><br><span>                     /* Handle internally */</span><br><span>                      ss->u.iuse->handle_ussd(ss, gsup, req);</span><br><span style="color: hsl(0, 100%, 40%);">-                   /* Release session immediately */</span><br><span style="color: hsl(0, 100%, 40%);">-                       ss_session_free(ss);</span><br><span style="color: hsl(120, 100%, 40%);">+                  /* Release session if the handler has changed its state to END */</span><br><span style="color: hsl(120, 100%, 40%);">+                     if (ss->state == OSMO_GSUP_SESSION_STATE_END)</span><br><span style="color: hsl(120, 100%, 40%);">+                              ss_session_free(ss);</span><br><span>                 }</span><br><span>    }</span><br><span> </span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-hlr/+/21182">change 21182</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-hlr/+/21182"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-hlr </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I49262e7fe26f29dedbf126087cfb8f3bb3c548dc </div>
<div style="display:none"> Gerrit-Change-Number: 21182 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: fixeria <vyanitskiy@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>