<p></p>
<blockquote>
<p dir="auto">Correct. libstirshaken didn't make a use of xchain only after your PR</p>
</blockquote>
<p dir="auto">Actually before I started tinkering, it was using that code you linked to, which is why it could validate certificates the first time yet failed when they loaded from cache.  It leaks memory even when loading a certificate+intermediary the first time.  It simply leaks even more now that it can load certificate+intermediary from cache.</p>
<p dir="auto">At any rate I have submitted <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1478184455" data-permission-text="Title is private" data-url="https://github.com/signalwire/libstirshaken/issues/125" data-hovercard-type="pull_request" data-hovercard-url="/signalwire/libstirshaken/pull/125/hovercard" href="https://github.com/signalwire/libstirshaken/pull/125">signalwire/libstirshaken#125</a> that will ensure xchain is cleaned up in all use cases.</p>
<p dir="auto">All 3 of these PRs can be merged independently of each other.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/pull/3289#issuecomment-1338922260">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZKOM2INDX3CMPD2CXTWL3WO7ANCNFSM6AAAAAASQDBAAY">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/ABO7UZJXJNNLXFUEGMWCXCLWL3WO7A5CNFSM6AAAAAASQDBAA2WGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTSPZZKRI.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><kamailio/kamailio/pull/3289/c1338922260</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/kamailio/kamailio/pull/3289#issuecomment-1338922260",
"url": "https://github.com/kamailio/kamailio/pull/3289#issuecomment-1338922260",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>