<p>With <a href="https://github.com/kamailio/kamailio/pull/998" class="issue-link js-issue-link" data-url="https://github.com/kamailio/kamailio/issues/998" data-id="208384447" data-error-text="Failed to load issue title" data-permission-text="Issue title is private">#998</a> and <a href="https://github.com/kamailio/kamailio/pull/1000" class="issue-link js-issue-link" data-url="https://github.com/kamailio/kamailio/issues/1000" data-id="208437036" data-error-text="Failed to load issue title" data-permission-text="Issue title is private">#1000</a> applied and some debug</p>
<p>REGISTER</p>
<pre><code>Feb 17 14:03:55 sp1 proxy[22494]: NOTICE: <script>: New request on proxy - M=REGISTER R=sip:192.168.1.71 F=sip:43993005@192.168.1.71 T=sip:43993005@192.168.1.71 IP=192.168.1.42:23583 (127.0.0.1:5060) ID=2b992fcc401d153fccd64bcdd8fed57b@0.0.0.0 UA='Jitsi2.9.5521Linux'
Feb 17 14:03:55 sp1 proxy[22494]: DEBUG: usrloc [udomain.c:641]: db_load_urecord(): aor 43993005@192.168.1.71 not found in table location
Feb 17 14:03:55 sp1 proxy[22494]: DEBUG: usrloc [udomain.c:174]: get_static_urecord(): urecord static[0x7fe7be1a1200]
Feb 17 14:03:55 sp1 proxy[22494]: DEBUG: registrar [path.c:108]: build_path_vector(): received is <sip:192.168.1.42:23583>
Feb 17 14:03:55 sp1 proxy[22494]: DEBUG: registrar [path.c:116]: build_path_vector(): path is <<sip:lb@127.0.0.1;lr;received=sip:192.168.1.42:23583;socket=sip:192.168.1.71:5060>>
Feb 17 14:03:55 sp1 proxy[22494]: DEBUG: registrar [save.c:410]: pack_ci(): generated ruid is: uloc-58a6f487-57de-1
Feb 17 14:03:55 sp1 proxy[22494]: DEBUG: usrloc [ucontact.c:142]: new_ucontact(): new ucontact[0x7fe7ae088248]
Feb 17 14:03:55 sp1 proxy[22494]: DEBUG: usrloc [ul_callback.h:84]: run_ul_callbacks(): contact=0x7fe7ae088248, callback type 1/1, id 0 entered
Feb 17 14:03:55 sp1 proxy[22494]: DEBUG: pua_reginfo [usrloc_cb.c:245]: reginfo_usrloc_cb(): AOR: 43993005@192.168.1.71 (location)
Feb 17 14:03:55 sp1 proxy[22494]: DEBUG: pua_reginfo [usrloc_cb.c:246]: reginfo_usrloc_cb(): type= UL_CONTACT_INSERT
Feb 17 14:03:55 sp1 proxy[22494]: DEBUG: usrloc [udomain.c:174]: get_static_urecord(): urecord static[0x7fe7be1a1200]
Feb 17 14:03:55 sp1 proxy[22494]: DEBUG: usrloc [ucontact.c:142]: new_ucontact(): new ucontact[0x7fe7ae088640]
Feb 17 14:03:55 sp1 proxy[22494]: DEBUG: usrloc [udomain.c:1155]: get_urecord(): DB_ONLY urecord[0x7fe7be1a1200]
Feb 17 14:03:55 sp1 proxy[22494]: DEBUG: pua_reginfo [usrloc_cb.c:105]: build_reginfo_full(): Updated Contact sip:43993005@192.168.1.42:23583;transport=udp;registering_acc=192_168_1_71[uloc-58a6f487-57de-1]
Feb 17 14:03:55 sp1 proxy[22494]: DEBUG: pua_reginfo [usrloc_cb.c:111]: build_reginfo_full(): Contact sip:43993005@192.168.1.42:23583;transport=udp;registering_acc=192_168_1_71[uloc-58a6f487-57de-1]
Feb 17 14:03:55 sp1 proxy[22494]: DEBUG: pua_reginfo [usrloc_cb.c:303]: reginfo_usrloc_cb(): XML-Body:#012<?xml version="1.0"?>#012<reginfo xmlns="urn:ietf:params:xml:ns:reginfo" version="0" state="full">#012  <registration aor="sip:43993005@192.168.1.71" id="0x7fe7be1a1200" state="active">#012    <contact id="0x7fe7ae088640" state="active" event="created" expires="434" callid="2b992fcc401d153fccd64bcdd8fed57b@0.0.0.0" cseq="2" received="sip:192.168.1.42:23583" path="&lt;sip:lb@127.0.0.1;lr;received=sip:192.168.1.42:23583;socket=sip:192.168.1.71:5060&gt;" user_agent="Jitsi2.9.5521Linux">#012      <uri>sip:43993005@192.168.1.42:23583;transport=udp;registering_acc=192_168_1_71</uri>#012    </contact>#012  </registration>#012</reginfo>#012
Feb 17 14:03:55 sp1 proxy[22494]: DEBUG: pua_reginfo [usrloc_cb.c:305]: reginfo_usrloc_cb(): Contact sip:43993005@192.168.1.42:23583;transport=udp;registering_acc=192_168_1_71, 0x7fe7ae088248
Feb 17 14:03:55 sp1 proxy[22494]: DEBUG: usrloc [urecord.c:553]: release_urecord(): free urecord[0x7fe7be1a1200]
Feb 17 14:03:55 sp1 proxy[22494]: DEBUG: usrloc [ucontact.c:179]: free_ucontact(): free ucontact[0x7fe7ae088640]
Feb 17 14:03:55 sp1 proxy[22494]: DEBUG: registrar [reply.c:366]: build_contact(): created Contact HF: Contact: <sip:43993005@192.168.1.42:23583;transport=udp;registering_acc=192_168_1_71>;expires=434;received="sip:192.168.1.42:23583"#015#012
Feb 17 14:03:55 sp1 proxy[22494]: DEBUG: usrloc [urecord.c:553]: release_urecord(): free urecord[0x7fe7be1a1200]
Feb 17 14:03:55 sp1 proxy[22494]: DEBUG: usrloc [ucontact.c:179]: free_ucontact(): free ucontact[0x7fe7ae088248]
Feb 17 14:03:55 sp1 proxy[22494]: NOTICE: <script>: Contacts successfully saved, expires in 600s - R=sip:192.168.1.71 ID=2b992fcc401d153fccd64bcdd8fed57b@0.0.0.0 UA='Jitsi2.9.5521Linux'
</code></pre>
<p>Both <code>ucontact[0x7fe7ae088248]</code> and <code>ucontact[0x7fe7ae088640]</code> are freed now</p>
<p>UPDATE REGISTER</p>
<pre><code>Feb 17 14:04:10 sp1 proxy[22494]: NOTICE: <script>: New request on proxy - M=REGISTER R=sip:192.168.1.71 F=sip:43993005@192.168.1.71 T=sip:43993005@192.168.1.71 IP=192.168.1.42:23583 (127.0.0.1:5060) ID=2b992fcc401d153fccd64bcdd8fed57b@0.0.0.0 UA='Jitsi2.9.5521Linux'
Feb 17 14:04:10 sp1 proxy[22494]: DEBUG: usrloc [udomain.c:174]: get_static_urecord(): urecord static[0x7fe7be1a1200]
Feb 17 14:04:10 sp1 proxy[22494]: DEBUG: usrloc [ucontact.c:142]: new_ucontact(): new ucontact[0x7fe7ae086930]
Feb 17 14:04:10 sp1 proxy[22494]: DEBUG: usrloc [udomain.c:1155]: get_urecord(): DB_ONLY urecord[0x7fe7be1a1200]
Feb 17 14:04:10 sp1 proxy[22494]: DEBUG: registrar [path.c:108]: build_path_vector(): received is <sip:192.168.1.42:23583>
Feb 17 14:04:10 sp1 proxy[22494]: DEBUG: registrar [path.c:116]: build_path_vector(): path is <<sip:lb@127.0.0.1;lr;received=sip:192.168.1.42:23583;socket=sip:192.168.1.71:5060>>
Feb 17 14:04:10 sp1 proxy[22494]: DEBUG: registrar [save.c:410]: pack_ci(): generated ruid is: uloc-58a6f487-57de-2
Feb 17 14:04:10 sp1 proxy[22494]: DEBUG: registrar [save.c:591]: test_max_contacts(): 1 valid contacts
Feb 17 14:04:10 sp1 proxy[22494]: DEBUG: registrar [save.c:613]: test_max_contacts(): 1 contacts after commit
Feb 17 14:04:10 sp1 proxy[22494]: DEBUG: registrar [save.c:410]: pack_ci(): generated ruid is: uloc-58a6f487-57de-3
Feb 17 14:04:10 sp1 proxy[22494]: DEBUG: usrloc [ucontact.c:1005]: db_update_ucontact_ruid(): ruid:uloc-58a6f487-57de-1
Feb 17 14:04:10 sp1 proxy[22494]: DEBUG: usrloc [ucontact.c:1134]: db_update_ucontact_ruid(): contact:sip:43993005@192.168.1.42:23583;transport=udp;registering_acc=192_168_1_71
Feb 17 14:04:10 sp1 proxy[22494]: DEBUG: usrloc [ucontact.c:1693]: update_ucontact(): exists callback for type= UL_CONTACT_UPDATE
Feb 17 14:04:10 sp1 proxy[22494]: DEBUG: usrloc [ul_callback.h:84]: run_ul_callbacks(): contact=0x7fe7ae086930, callback type 2/2, id 2 entered
Feb 17 14:04:10 sp1 proxy[22494]: DEBUG: pua_reginfo [usrloc_cb.c:245]: reginfo_usrloc_cb(): AOR: 43993005@192.168.1.71 (location)
Feb 17 14:04:10 sp1 proxy[22494]: DEBUG: pua_reginfo [usrloc_cb.c:247]: reginfo_usrloc_cb(): type= UL_CONTACT_UPDATE
Feb 17 14:04:10 sp1 proxy[22494]: DEBUG: usrloc [udomain.c:174]: get_static_urecord(): urecord static[0x7fe7be1a1200]
Feb 17 14:04:10 sp1 proxy[22494]: DEBUG: usrloc [ucontact.c:142]: new_ucontact(): new ucontact[0x7fe7ae086d28]
Feb 17 14:04:10 sp1 proxy[22494]: DEBUG: usrloc [udomain.c:1155]: get_urecord(): DB_ONLY urecord[0x7fe7be1a1200]
Feb 17 14:04:10 sp1 proxy[22494]: DEBUG: pua_reginfo [usrloc_cb.c:105]: build_reginfo_full(): Updated Contact sip:43993005@192.168.1.42:23583;transport=udp;registering_acc=192_168_1_71[uloc-58a6f487-57de-1]
Feb 17 14:04:10 sp1 proxy[22494]: DEBUG: pua_reginfo [usrloc_cb.c:111]: build_reginfo_full(): Contact sip:43993005@192.168.1.42:23583;transport=udp;registering_acc=192_168_1_71[uloc-58a6f487-57de-1]
Feb 17 14:04:10 sp1 proxy[22494]: DEBUG: pua_reginfo [usrloc_cb.c:303]: reginfo_usrloc_cb(): XML-Body:#012<?xml version="1.0"?>#012<reginfo xmlns="urn:ietf:params:xml:ns:reginfo" version="0" state="full">#012  <registration aor="sip:43993005@192.168.1.71" id="0x7fe7be1a1200" state="active">#012    <contact id="0x7fe7ae086d28" state="active" event="refreshed" expires="598" callid="2b992fcc401d153fccd64bcdd8fed57b@0.0.0.0" cseq="3" received="sip:192.168.1.42:23583" path="&lt;sip:lb@127.0.0.1;lr;received=sip:192.168.1.42:23583;socket=sip:192.168.1.71:5060&gt;" user_agent="Jitsi2.9.5521Linux">#012      <uri>sip:43993005@192.168.1.42:23583;transport=udp;registering_acc=192_168_1_71</uri>#012    </contact>#012  </registration>#012</reginfo>#012
Feb 17 14:04:10 sp1 proxy[22494]: DEBUG: pua_reginfo [usrloc_cb.c:305]: reginfo_usrloc_cb(): Contact sip:43993005@192.168.1.42:23583;transport=udp;registering_acc=192_168_1_71, 0x7fe7ae086930
Feb 17 14:04:10 sp1 proxy[22494]: DEBUG: usrloc [urecord.c:553]: release_urecord(): free urecord[0x7fe7be1a1200]
Feb 17 14:04:10 sp1 proxy[22494]: DEBUG: usrloc [ucontact.c:179]: free_ucontact(): free ucontact[0x7fe7ae086d28]
Feb 17 14:04:10 sp1 proxy[22494]: DEBUG: registrar [reply.c:366]: build_contact(): created Contact HF: Contact: <sip:43993005@192.168.1.42:23583;transport=udp;registering_acc=192_168_1_71>;expires=598;received="sip:192.168.1.42:23583"#015#012
Feb 17 14:04:10 sp1 proxy[22494]: DEBUG: usrloc [urecord.c:553]: release_urecord(): free urecord[0x7fe7be1a1200]
Feb 17 14:04:10 sp1 proxy[22494]: DEBUG: usrloc [ucontact.c:179]: free_ucontact(): free ucontact[0x7fe7ae086930]
Feb 17 14:04:10 sp1 proxy[22494]: NOTICE: <script>: Contacts successfully updated, expires in 600s - R=sip:192.168.1.71 ID=2b992fcc401d153fccd64bcdd8fed57b@0.0.0.0 UA='Jitsi2.9.5521Linux'
</code></pre>
<p>both <code>ucontact[0x7fe7ae086930]</code> and <code>ucontact[0x7fe7ae086d28]</code> are freed, no leak detected.</p>
<p>UNREGISTER</p>
<pre><code>Feb 17 14:05:51 sp1 proxy[22494]: NOTICE: <script>: New request on proxy - M=REGISTER R=sip:192.168.1.71 F=sip:43993005@192.168.1.71 T=sip:43993005@192.168.1.71 IP=192.168.1.42:2358
3 (127.0.0.1:5060) ID=2b992fcc401d153fccd64bcdd8fed57b@0.0.0.0 UA='Jitsi2.9.5521Linux'
Feb 17 14:05:51 sp1 proxy[22494]: DEBUG: usrloc [udomain.c:174]: get_static_urecord(): urecord static[0x7fe7be1a1200]
Feb 17 14:05:51 sp1 proxy[22494]: DEBUG: usrloc [ucontact.c:142]: new_ucontact(): new ucontact[0x7fe7ae089760]
Feb 17 14:05:51 sp1 proxy[22494]: DEBUG: usrloc [udomain.c:1155]: get_urecord(): DB_ONLY urecord[0x7fe7be1a1200]
Feb 17 14:05:51 sp1 proxy[22494]: DEBUG: registrar [path.c:108]: build_path_vector(): received is <sip:192.168.1.42:23583>
Feb 17 14:05:51 sp1 proxy[22494]: DEBUG: registrar [path.c:116]: build_path_vector(): path is <<sip:lb@127.0.0.1;lr;received=sip:192.168.1.42:23583;socket=sip:192.168.1.71:5060>>
Feb 17 14:05:51 sp1 proxy[22494]: DEBUG: registrar [save.c:410]: pack_ci(): generated ruid is: uloc-58a6f487-57de-01
Feb 17 14:05:51 sp1 proxy[22494]: DEBUG: registrar [save.c:591]: test_max_contacts(): 1 valid contacts
Feb 17 14:05:51 sp1 proxy[22494]: DEBUG: registrar [save.c:613]: test_max_contacts(): 0 contacts after commit
Feb 17 14:05:51 sp1 proxy[22494]: DEBUG: registrar [save.c:410]: pack_ci(): generated ruid is: uloc-58a6f487-57de-11
Feb 17 14:05:51 sp1 proxy[22494]: DEBUG: usrloc [ul_callback.h:84]: run_ul_callbacks(): contact=0x7fe7ae089760, callback type 4/4, id 3 entered
Feb 17 14:05:51 sp1 proxy[22494]: DEBUG: pua_reginfo [usrloc_cb.c:245]: reginfo_usrloc_cb(): AOR: 43993005@192.168.1.71 (location)
Feb 17 14:05:51 sp1 proxy[22494]: DEBUG: pua_reginfo [usrloc_cb.c:249]: reginfo_usrloc_cb(): type= UL_CONTACT_DELETE
Feb 17 14:05:51 sp1 proxy[22494]: DEBUG: usrloc [udomain.c:174]: get_static_urecord(): urecord static[0x7fe7be1a1200]
Feb 17 14:05:51 sp1 proxy[22494]: DEBUG: usrloc [ucontact.c:142]: new_ucontact(): new ucontact[0x7fe7ae089b58]
Feb 17 14:05:51 sp1 proxy[22494]: DEBUG: usrloc [udomain.c:1155]: get_urecord(): DB_ONLY urecord[0x7fe7be1a1200]
Feb 17 14:05:51 sp1 proxy[22494]: DEBUG: pua_reginfo [usrloc_cb.c:105]: build_reginfo_full(): Updated Contact sip:43993005@192.168.1.42:23583;transport=udp;registering_acc=192_168_1
_71[uloc-58a6f487-57de-1]
Feb 17 14:05:51 sp1 proxy[22494]: DEBUG: pua_reginfo [usrloc_cb.c:111]: build_reginfo_full(): Contact sip:43993005@192.168.1.42:23583;transport=udp;registering_acc=192_168_1_71[uloc
-58a6f487-57de-1]
Feb 17 14:05:51 sp1 proxy[22494]: DEBUG: pua_reginfo [usrloc_cb.c:303]: reginfo_usrloc_cb(): XML-Body:#012<?xml version="1.0"?>#012<reginfo xmlns="urn:ietf:params:xml:ns:reginfo" ve
rsion="0" state="full">#012  <registration aor="sip:43993005@192.168.1.71" id="0x7fe7be1a1200" state="terminated">#012    <contact id="0x7fe7ae089b58" state="terminated" event="unre
gistered" expires="409" callid="2b992fcc401d153fccd64bcdd8fed57b@0.0.0.0" cseq="9" received="sip:192.168.1.42:23583" path="&lt;sip:lb@127.0.0.1;lr;received=sip:192.168.1.42:23583;so
cket=sip:192.168.1.71:5060&gt;" user_agent="Jitsi2.9.5521Linux">#012      <uri>sip:43993005@192.168.1.42:23583;transport=udp;registering_acc=192_168_1_71</uri>#012    </contact>#012
  </registration>#012</reginfo>#012
Feb 17 14:05:51 sp1 proxy[22494]: DEBUG: pua_reginfo [usrloc_cb.c:305]: reginfo_usrloc_cb(): Contact sip:43993005@192.168.1.42:23583;transport=udp;registering_acc=192_168_1_71, 0x7f
e7ae089760
Feb 17 14:05:51 sp1 proxy[22494]: DEBUG: usrloc [urecord.c:553]: release_urecord(): free urecord[0x7fe7be1a1200]
Feb 17 14:05:51 sp1 proxy[22494]: DEBUG: usrloc [ucontact.c:179]: free_ucontact(): free ucontact[0x7fe7ae089b58]
Feb 17 14:05:51 sp1 proxy[22494]: DEBUG: usrloc [ucontact.c:1797]: uldb_delete_attrs_ruid(): trying to delete location attributes
Feb 17 14:05:51 sp1 proxy[22494]: DEBUG: usrloc [ucontact.c:179]: free_ucontact(): free ucontact[0x7fe7ae089760]
Feb 17 14:05:51 sp1 proxy[22494]: DEBUG: usrloc [urecord.c:553]: release_urecord(): free urecord[0x7fe7be1a1200]
Feb 17 14:05:51 sp1 proxy[22494]: NOTICE: <script>: Contacts successfully deleted - R=sip:192.168.1.71 ID=2b992fcc401d153fccd64bcdd8fed57b@0.0.0.0 UA='Jitsi2.9.5521Linux'
</code></pre>
<p>Both <code>ucontact[0x7fe7ae089760]</code> and <code>ucontact[0x7fe7ae089b58]</code> are freed, no leak detected.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/issues/997#issuecomment-280646535">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AF36ZUZiBVlbfs-f1_trkxsDO_zCe26xks5rdZ3TgaJpZM4MC6n1">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AF36ZeDEeqXNk2bMiwDTlJ8TZtyUC4Stks5rdZ3TgaJpZM4MC6n1.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/kamailio/kamailio/issues/997#issuecomment-280646535"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>

<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/kamailio/kamailio","title":"kamailio/kamailio","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/kamailio/kamailio"}},"updates":{"snippets":[{"icon":"PERSON","message":"@linuxmaniac in #997: With #998 and #1000 applied and some debug\r\n\r\nREGISTER\r\n```\r\nFeb 17 14:03:55 sp1 proxy[22494]: NOTICE: \u003cscript\u003e: New request on proxy - M=REGISTER R=sip:192.168.1.71 F=sip:43993005@192.168.1.71 T=sip:43993005@192.168.1.71 IP=192.168.1.42:23583 (127.0.0.1:5060) ID=2b992fcc401d153fccd64bcdd8fed57b@0.0.0.0 UA='Jitsi2.9.5521Linux'\r\nFeb 17 14:03:55 sp1 proxy[22494]: DEBUG: usrloc [udomain.c:641]: db_load_urecord(): aor 43993005@192.168.1.71 not found in table location\r\nFeb 17 14:03:55 sp1 proxy[22494]: DEBUG: usrloc [udomain.c:174]: get_static_urecord(): urecord static[0x7fe7be1a1200]\r\nFeb 17 14:03:55 sp1 proxy[22494]: DEBUG: registrar [path.c:108]: build_path_vector(): received is \u003csip:192.168.1.42:23583\u003e\r\nFeb 17 14:03:55 sp1 proxy[22494]: DEBUG: registrar [path.c:116]: build_path_vector(): path is \u003c\u003csip:lb@127.0.0.1;lr;received=sip:192.168.1.42:23583;socket=sip:192.168.1.71:5060\u003e\u003e\r\nFeb 17 14:03:55 sp1 proxy[22494]: DEBUG: registrar [save.c:410]: pack_ci(): generated ruid is: uloc-58a6f487-57de-1\r\nFeb 17 14:03:55 sp1 proxy[22494]: DEBUG: usrloc [ucontact.c:142]: new_ucontact(): new ucontact[0x7fe7ae088248]\r\nFeb 17 14:03:55 sp1 proxy[22494]: DEBUG: usrloc [ul_callback.h:84]: run_ul_callbacks(): contact=0x7fe7ae088248, callback type 1/1, id 0 entered\r\nFeb 17 14:03:55 sp1 proxy[22494]: DEBUG: pua_reginfo [usrloc_cb.c:245]: reginfo_usrloc_cb(): AOR: 43993005@192.168.1.71 (location)\r\nFeb 17 14:03:55 sp1 proxy[22494]: DEBUG: pua_reginfo [usrloc_cb.c:246]: reginfo_usrloc_cb(): type= UL_CONTACT_INSERT\r\nFeb 17 14:03:55 sp1 proxy[22494]: DEBUG: usrloc [udomain.c:174]: get_static_urecord(): urecord static[0x7fe7be1a1200]\r\nFeb 17 14:03:55 sp1 proxy[22494]: DEBUG: usrloc [ucontact.c:142]: new_ucontact(): new ucontact[0x7fe7ae088640]\r\nFeb 17 14:03:55 sp1 proxy[22494]: DEBUG: usrloc [udomain.c:1155]: get_urecord(): DB_ONLY urecord[0x7fe7be1a1200]\r\nFeb 17 14:03:55 sp1 proxy[22494]: DEBUG: pua_reginfo [usrloc_cb.c:105]: build_reginfo_full(): Updated Contact sip:43993005@192.168.1.42:23583;transport=udp;registering_acc=192_168_1_71[uloc-58a6f487-57de-1]\r\nFeb 17 14:03:55 sp1 proxy[22494]: DEBUG: pua_reginfo [usrloc_cb.c:111]: build_reginfo_full(): Contact sip:43993005@192.168.1.42:23583;transport=udp;registering_acc=192_168_1_71[uloc-58a6f487-57de-1]\r\nFeb 17 14:03:55 sp1 proxy[22494]: DEBUG: pua_reginfo [usrloc_cb.c:303]: reginfo_usrloc_cb(): XML-Body:#012\u003c?xml version=\"1.0\"?\u003e#012\u003creginfo xmlns=\"urn:ietf:params:xml:ns:reginfo\" version=\"0\" state=\"full\"\u003e#012  \u003cregistration aor=\"sip:43993005@192.168.1.71\" id=\"0x7fe7be1a1200\" state=\"active\"\u003e#012    \u003ccontact id=\"0x7fe7ae088640\" state=\"active\" event=\"created\" expires=\"434\" callid=\"2b992fcc401d153fccd64bcdd8fed57b@0.0.0.0\" cseq=\"2\" received=\"sip:192.168.1.42:23583\" path=\"\u0026lt;sip:lb@127.0.0.1;lr;received=sip:192.168.1.42:23583;socket=sip:192.168.1.71:5060\u0026gt;\" user_agent=\"Jitsi2.9.5521Linux\"\u003e#012      \u003curi\u003esip:43993005@192.168.1.42:23583;transport=udp;registering_acc=192_168_1_71\u003c/uri\u003e#012    \u003c/contact\u003e#012  \u003c/registration\u003e#012\u003c/reginfo\u003e#012\r\nFeb 17 14:03:55 sp1 proxy[22494]: DEBUG: pua_reginfo [usrloc_cb.c:305]: reginfo_usrloc_cb(): Contact sip:43993005@192.168.1.42:23583;transport=udp;registering_acc=192_168_1_71, 0x7fe7ae088248\r\nFeb 17 14:03:55 sp1 proxy[22494]: DEBUG: usrloc [urecord.c:553]: release_urecord(): free urecord[0x7fe7be1a1200]\r\nFeb 17 14:03:55 sp1 proxy[22494]: DEBUG: usrloc [ucontact.c:179]: free_ucontact(): free ucontact[0x7fe7ae088640]\r\nFeb 17 14:03:55 sp1 proxy[22494]: DEBUG: registrar [reply.c:366]: build_contact(): created Contact HF: Contact: \u003csip:43993005@192.168.1.42:23583;transport=udp;registering_acc=192_168_1_71\u003e;expires=434;received=\"sip:192.168.1.42:23583\"#015#012\r\nFeb 17 14:03:55 sp1 proxy[22494]: DEBUG: usrloc [urecord.c:553]: release_urecord(): free urecord[0x7fe7be1a1200]\r\nFeb 17 14:03:55 sp1 proxy[22494]: DEBUG: usrloc [ucontact.c:179]: free_ucontact(): free ucontact[0x7fe7ae088248]\r\nFeb 17 14:03:55 sp1 proxy[22494]: NOTICE: \u003cscript\u003e: Contacts successfully saved, expires in 600s - R=sip:192.168.1.71 ID=2b992fcc401d153fccd64bcdd8fed57b@0.0.0.0 UA='Jitsi2.9.5521Linux'\r\n```\r\n\r\nBoth ``ucontact[0x7fe7ae088248]`` and ``ucontact[0x7fe7ae088640]`` are freed now\r\n\r\nUPDATE REGISTER\r\n\r\n```\r\nFeb 17 14:04:10 sp1 proxy[22494]: NOTICE: \u003cscript\u003e: New request on proxy - M=REGISTER R=sip:192.168.1.71 F=sip:43993005@192.168.1.71 T=sip:43993005@192.168.1.71 IP=192.168.1.42:23583 (127.0.0.1:5060) ID=2b992fcc401d153fccd64bcdd8fed57b@0.0.0.0 UA='Jitsi2.9.5521Linux'\r\nFeb 17 14:04:10 sp1 proxy[22494]: DEBUG: usrloc [udomain.c:174]: get_static_urecord(): urecord static[0x7fe7be1a1200]\r\nFeb 17 14:04:10 sp1 proxy[22494]: DEBUG: usrloc [ucontact.c:142]: new_ucontact(): new ucontact[0x7fe7ae086930]\r\nFeb 17 14:04:10 sp1 proxy[22494]: DEBUG: usrloc [udomain.c:1155]: get_urecord(): DB_ONLY urecord[0x7fe7be1a1200]\r\nFeb 17 14:04:10 sp1 proxy[22494]: DEBUG: registrar [path.c:108]: build_path_vector(): received is \u003csip:192.168.1.42:23583\u003e\r\nFeb 17 14:04:10 sp1 proxy[22494]: DEBUG: registrar [path.c:116]: build_path_vector(): path is \u003c\u003csip:lb@127.0.0.1;lr;received=sip:192.168.1.42:23583;socket=sip:192.168.1.71:5060\u003e\u003e\r\nFeb 17 14:04:10 sp1 proxy[22494]: DEBUG: registrar [save.c:410]: pack_ci(): generated ruid is: uloc-58a6f487-57de-2\r\nFeb 17 14:04:10 sp1 proxy[22494]: DEBUG: registrar [save.c:591]: test_max_contacts(): 1 valid contacts\r\nFeb 17 14:04:10 sp1 proxy[22494]: DEBUG: registrar [save.c:613]: test_max_contacts(): 1 contacts after commit\r\nFeb 17 14:04:10 sp1 proxy[22494]: DEBUG: registrar [save.c:410]: pack_ci(): generated ruid is: uloc-58a6f487-57de-3\r\nFeb 17 14:04:10 sp1 proxy[22494]: DEBUG: usrloc [ucontact.c:1005]: db_update_ucontact_ruid(): ruid:uloc-58a6f487-57de-1\r\nFeb 17 14:04:10 sp1 proxy[22494]: DEBUG: usrloc [ucontact.c:1134]: db_update_ucontact_ruid(): contact:sip:43993005@192.168.1.42:23583;transport=udp;registering_acc=192_168_1_71\r\nFeb 17 14:04:10 sp1 proxy[22494]: DEBUG: usrloc [ucontact.c:1693]: update_ucontact(): exists callback for type= UL_CONTACT_UPDATE\r\nFeb 17 14:04:10 sp1 proxy[22494]: DEBUG: usrloc [ul_callback.h:84]: run_ul_callbacks(): contact=0x7fe7ae086930, callback type 2/2, id 2 entered\r\nFeb 17 14:04:10 sp1 proxy[22494]: DEBUG: pua_reginfo [usrloc_cb.c:245]: reginfo_usrloc_cb(): AOR: 43993005@192.168.1.71 (location)\r\nFeb 17 14:04:10 sp1 proxy[22494]: DEBUG: pua_reginfo [usrloc_cb.c:247]: reginfo_usrloc_cb(): type= UL_CONTACT_UPDATE\r\nFeb 17 14:04:10 sp1 proxy[22494]: DEBUG: usrloc [udomain.c:174]: get_static_urecord(): urecord static[0x7fe7be1a1200]\r\nFeb 17 14:04:10 sp1 proxy[22494]: DEBUG: usrloc [ucontact.c:142]: new_ucontact(): new ucontact[0x7fe7ae086d28]\r\nFeb 17 14:04:10 sp1 proxy[22494]: DEBUG: usrloc [udomain.c:1155]: get_urecord(): DB_ONLY urecord[0x7fe7be1a1200]\r\nFeb 17 14:04:10 sp1 proxy[22494]: DEBUG: pua_reginfo [usrloc_cb.c:105]: build_reginfo_full(): Updated Contact sip:43993005@192.168.1.42:23583;transport=udp;registering_acc=192_168_1_71[uloc-58a6f487-57de-1]\r\nFeb 17 14:04:10 sp1 proxy[22494]: DEBUG: pua_reginfo [usrloc_cb.c:111]: build_reginfo_full(): Contact sip:43993005@192.168.1.42:23583;transport=udp;registering_acc=192_168_1_71[uloc-58a6f487-57de-1]\r\nFeb 17 14:04:10 sp1 proxy[22494]: DEBUG: pua_reginfo [usrloc_cb.c:303]: reginfo_usrloc_cb(): XML-Body:#012\u003c?xml version=\"1.0\"?\u003e#012\u003creginfo xmlns=\"urn:ietf:params:xml:ns:reginfo\" version=\"0\" state=\"full\"\u003e#012  \u003cregistration aor=\"sip:43993005@192.168.1.71\" id=\"0x7fe7be1a1200\" state=\"active\"\u003e#012    \u003ccontact id=\"0x7fe7ae086d28\" state=\"active\" event=\"refreshed\" expires=\"598\" callid=\"2b992fcc401d153fccd64bcdd8fed57b@0.0.0.0\" cseq=\"3\" received=\"sip:192.168.1.42:23583\" path=\"\u0026lt;sip:lb@127.0.0.1;lr;received=sip:192.168.1.42:23583;socket=sip:192.168.1.71:5060\u0026gt;\" user_agent=\"Jitsi2.9.5521Linux\"\u003e#012      \u003curi\u003esip:43993005@192.168.1.42:23583;transport=udp;registering_acc=192_168_1_71\u003c/uri\u003e#012    \u003c/contact\u003e#012  \u003c/registration\u003e#012\u003c/reginfo\u003e#012\r\nFeb 17 14:04:10 sp1 proxy[22494]: DEBUG: pua_reginfo [usrloc_cb.c:305]: reginfo_usrloc_cb(): Contact sip:43993005@192.168.1.42:23583;transport=udp;registering_acc=192_168_1_71, 0x7fe7ae086930\r\nFeb 17 14:04:10 sp1 proxy[22494]: DEBUG: usrloc [urecord.c:553]: release_urecord(): free urecord[0x7fe7be1a1200]\r\nFeb 17 14:04:10 sp1 proxy[22494]: DEBUG: usrloc [ucontact.c:179]: free_ucontact(): free ucontact[0x7fe7ae086d28]\r\nFeb 17 14:04:10 sp1 proxy[22494]: DEBUG: registrar [reply.c:366]: build_contact(): created Contact HF: Contact: \u003csip:43993005@192.168.1.42:23583;transport=udp;registering_acc=192_168_1_71\u003e;expires=598;received=\"sip:192.168.1.42:23583\"#015#012\r\nFeb 17 14:04:10 sp1 proxy[22494]: DEBUG: usrloc [urecord.c:553]: release_urecord(): free urecord[0x7fe7be1a1200]\r\nFeb 17 14:04:10 sp1 proxy[22494]: DEBUG: usrloc [ucontact.c:179]: free_ucontact(): free ucontact[0x7fe7ae086930]\r\nFeb 17 14:04:10 sp1 proxy[22494]: NOTICE: \u003cscript\u003e: Contacts successfully updated, expires in 600s - R=sip:192.168.1.71 ID=2b992fcc401d153fccd64bcdd8fed57b@0.0.0.0 UA='Jitsi2.9.5521Linux'\r\n```\r\n\r\nboth ``ucontact[0x7fe7ae086930]`` and ``ucontact[0x7fe7ae086d28]`` are freed, no leak detected.\r\n\r\nUNREGISTER\r\n\r\n```\r\nFeb 17 14:05:51 sp1 proxy[22494]: NOTICE: \u003cscript\u003e: New request on proxy - M=REGISTER R=sip:192.168.1.71 F=sip:43993005@192.168.1.71 T=sip:43993005@192.168.1.71 IP=192.168.1.42:2358\r\n3 (127.0.0.1:5060) ID=2b992fcc401d153fccd64bcdd8fed57b@0.0.0.0 UA='Jitsi2.9.5521Linux'\r\nFeb 17 14:05:51 sp1 proxy[22494]: DEBUG: usrloc [udomain.c:174]: get_static_urecord(): urecord static[0x7fe7be1a1200]\r\nFeb 17 14:05:51 sp1 proxy[22494]: DEBUG: usrloc [ucontact.c:142]: new_ucontact(): new ucontact[0x7fe7ae089760]\r\nFeb 17 14:05:51 sp1 proxy[22494]: DEBUG: usrloc [udomain.c:1155]: get_urecord(): DB_ONLY urecord[0x7fe7be1a1200]\r\nFeb 17 14:05:51 sp1 proxy[22494]: DEBUG: registrar [path.c:108]: build_path_vector(): received is \u003csip:192.168.1.42:23583\u003e\r\nFeb 17 14:05:51 sp1 proxy[22494]: DEBUG: registrar [path.c:116]: build_path_vector(): path is \u003c\u003csip:lb@127.0.0.1;lr;received=sip:192.168.1.42:23583;socket=sip:192.168.1.71:5060\u003e\u003e\r\nFeb 17 14:05:51 sp1 proxy[22494]: DEBUG: registrar [save.c:410]: pack_ci(): generated ruid is: uloc-58a6f487-57de-01\r\nFeb 17 14:05:51 sp1 proxy[22494]: DEBUG: registrar [save.c:591]: test_max_contacts(): 1 valid contacts\r\nFeb 17 14:05:51 sp1 proxy[22494]: DEBUG: registrar [save.c:613]: test_max_contacts(): 0 contacts after commit\r\nFeb 17 14:05:51 sp1 proxy[22494]: DEBUG: registrar [save.c:410]: pack_ci(): generated ruid is: uloc-58a6f487-57de-11\r\nFeb 17 14:05:51 sp1 proxy[22494]: DEBUG: usrloc [ul_callback.h:84]: run_ul_callbacks(): contact=0x7fe7ae089760, callback type 4/4, id 3 entered\r\nFeb 17 14:05:51 sp1 proxy[22494]: DEBUG: pua_reginfo [usrloc_cb.c:245]: reginfo_usrloc_cb(): AOR: 43993005@192.168.1.71 (location)\r\nFeb 17 14:05:51 sp1 proxy[22494]: DEBUG: pua_reginfo [usrloc_cb.c:249]: reginfo_usrloc_cb(): type= UL_CONTACT_DELETE\r\nFeb 17 14:05:51 sp1 proxy[22494]: DEBUG: usrloc [udomain.c:174]: get_static_urecord(): urecord static[0x7fe7be1a1200]\r\nFeb 17 14:05:51 sp1 proxy[22494]: DEBUG: usrloc [ucontact.c:142]: new_ucontact(): new ucontact[0x7fe7ae089b58]\r\nFeb 17 14:05:51 sp1 proxy[22494]: DEBUG: usrloc [udomain.c:1155]: get_urecord(): DB_ONLY urecord[0x7fe7be1a1200]\r\nFeb 17 14:05:51 sp1 proxy[22494]: DEBUG: pua_reginfo [usrloc_cb.c:105]: build_reginfo_full(): Updated Contact sip:43993005@192.168.1.42:23583;transport=udp;registering_acc=192_168_1\r\n_71[uloc-58a6f487-57de-1]\r\nFeb 17 14:05:51 sp1 proxy[22494]: DEBUG: pua_reginfo [usrloc_cb.c:111]: build_reginfo_full(): Contact sip:43993005@192.168.1.42:23583;transport=udp;registering_acc=192_168_1_71[uloc\r\n-58a6f487-57de-1]\r\nFeb 17 14:05:51 sp1 proxy[22494]: DEBUG: pua_reginfo [usrloc_cb.c:303]: reginfo_usrloc_cb(): XML-Body:#012\u003c?xml version=\"1.0\"?\u003e#012\u003creginfo xmlns=\"urn:ietf:params:xml:ns:reginfo\" ve\r\nrsion=\"0\" state=\"full\"\u003e#012  \u003cregistration aor=\"sip:43993005@192.168.1.71\" id=\"0x7fe7be1a1200\" state=\"terminated\"\u003e#012    \u003ccontact id=\"0x7fe7ae089b58\" state=\"terminated\" event=\"unre\r\ngistered\" expires=\"409\" callid=\"2b992fcc401d153fccd64bcdd8fed57b@0.0.0.0\" cseq=\"9\" received=\"sip:192.168.1.42:23583\" path=\"\u0026lt;sip:lb@127.0.0.1;lr;received=sip:192.168.1.42:23583;so\r\ncket=sip:192.168.1.71:5060\u0026gt;\" user_agent=\"Jitsi2.9.5521Linux\"\u003e#012      \u003curi\u003esip:43993005@192.168.1.42:23583;transport=udp;registering_acc=192_168_1_71\u003c/uri\u003e#012    \u003c/contact\u003e#012\r\n  \u003c/registration\u003e#012\u003c/reginfo\u003e#012\r\nFeb 17 14:05:51 sp1 proxy[22494]: DEBUG: pua_reginfo [usrloc_cb.c:305]: reginfo_usrloc_cb(): Contact sip:43993005@192.168.1.42:23583;transport=udp;registering_acc=192_168_1_71, 0x7f\r\ne7ae089760\r\nFeb 17 14:05:51 sp1 proxy[22494]: DEBUG: usrloc [urecord.c:553]: release_urecord(): free urecord[0x7fe7be1a1200]\r\nFeb 17 14:05:51 sp1 proxy[22494]: DEBUG: usrloc [ucontact.c:179]: free_ucontact(): free ucontact[0x7fe7ae089b58]\r\nFeb 17 14:05:51 sp1 proxy[22494]: DEBUG: usrloc [ucontact.c:1797]: uldb_delete_attrs_ruid(): trying to delete location attributes\r\nFeb 17 14:05:51 sp1 proxy[22494]: DEBUG: usrloc [ucontact.c:179]: free_ucontact(): free ucontact[0x7fe7ae089760]\r\nFeb 17 14:05:51 sp1 proxy[22494]: DEBUG: usrloc [urecord.c:553]: release_urecord(): free urecord[0x7fe7be1a1200]\r\nFeb 17 14:05:51 sp1 proxy[22494]: NOTICE: \u003cscript\u003e: Contacts successfully deleted - R=sip:192.168.1.71 ID=2b992fcc401d153fccd64bcdd8fed57b@0.0.0.0 UA='Jitsi2.9.5521Linux'\r\n```\r\n\r\nBoth ``ucontact[0x7fe7ae089760]`` and ``ucontact[0x7fe7ae089b58]`` are freed, no leak detected."}],"action":{"name":"View Issue","url":"https://github.com/kamailio/kamailio/issues/997#issuecomment-280646535"}}}</script>