<p>The type SR_XTYPE_VPTR is not resulting in freeing the pointer when XAVP is destroyed, it was added to keep references to permanent structures kept in memory during runtime.</p>
<p>So I just added (commit <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/kamailio/kamailio/commit/126cfa51be8718082e20e268cf14d0649c60b17d/hovercard" href="https://github.com/kamailio/kamailio/commit/126cfa51be8718082e20e268cf14d0649c60b17d"><tt>126cfa5</tt></a>) the new type SR_XTYPE_SPTR which does a shm_free() on the pointer when the XAVP is destroyed.</p>
<p>If trace info struct is stored permanently in shared memory during Kamailio runtime, then SR_XTYPE_VPTR is ok, otherwise the patch needs to be updated to set SR_XTYPE_SPTR.</p>
<p>One more remark -- for tracking the dialog, if the trace info struct is not permanent, but destroyed with the XAVP, be sure you don't pass that pointer to dlg callbacks, because the life of XAVP is as long as transaction exist, but the dialog is taking longer.</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/pull/1963?email_source=notifications&email_token=ABO7UZKCVFLZM5ZT3KB5GNTPWZFH5A5CNFSM4HOVADQ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWBMT5Y#issuecomment-495110647">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZNPRMLWFY3EP5VEWD3PWZFH5ANCNFSM4HOVADQQ">mute the thread</a>.<img src="https://github.com/notifications/beacon/ABO7UZNR5TH67M7YS3HYCALPWZFH5A5CNFSM4HOVADQ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWBMT5Y.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/kamailio/kamailio/pull/1963?email_source=notifications\u0026email_token=ABO7UZKCVFLZM5ZT3KB5GNTPWZFH5A5CNFSM4HOVADQ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWBMT5Y#issuecomment-495110647",
"url": "https://github.com/kamailio/kamailio/pull/1963?email_source=notifications\u0026email_token=ABO7UZKCVFLZM5ZT3KB5GNTPWZFH5A5CNFSM4HOVADQ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWBMT5Y#issuecomment-495110647",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>