<p>Neels Hofmeyr has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/12266">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">vty: show subscriber: put() before printing the use count<br><br>Do not show the VTY command's own use count during 'show subscriber <ID>'.<br><br>When using 'show subscriber msisdn 2023', I was surprised to see a use count of<br>2 and suspected a use count leak. With 'show subscriber cache' however, the use<br>count is 1.<br><br>So I realized it is the vty command's own use count that makes it two, besides<br>the lu_complete=true one.<br><br>Change-Id: Id02b57b7ed299b010b9f8b9e809548eb1e6aa699<br>---<br>M src/libmsc/msc_vty.c<br>1 file changed, 4 insertions(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/66/12266/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/libmsc/msc_vty.c b/src/libmsc/msc_vty.c</span><br><span>index 06e1139..9516752 100644</span><br><span>--- a/src/libmsc/msc_vty.c</span><br><span>+++ b/src/libmsc/msc_vty.c</span><br><span>@@ -826,10 +826,12 @@</span><br><span>           return CMD_WARNING;</span><br><span>  }</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-   subscr_dump_full_vty(vty, vsub);</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(120, 100%, 40%);">+      /* Do not taint the use count in the output. It will not become deallocated, since we are not multi-threaded,</span><br><span style="color: hsl(120, 100%, 40%);">+  * and since it existed before we called _get() on it above. */</span><br><span>      vlr_subscr_put(vsub);</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+     subscr_dump_full_vty(vty, vsub);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>   return CMD_SUCCESS;</span><br><span> }</span><br><span> </span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/12266">change 12266</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/12266"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-msc </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: Id02b57b7ed299b010b9f8b9e809548eb1e6aa699 </div>
<div style="display:none"> Gerrit-Change-Number: 12266 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Neels Hofmeyr <nhofmeyr@sysmocom.de> </div>