<p></p>
<p dir="auto">Thank you for your contribution!<br>
What I see from the changes you explicitly set ptr->parsed = NULL. If you check the func "int parse_contact(struct hdr_field* _h)" there is a memory allocation for the contact body:<br>
<code>row 76:     b = (contact_body_t*)pkg_malloc(sizeof(contact_body_t)); </code><br>
It is possible to lead to a memory leak. I have suspicions that the old code works fine, but the problem, in general, is somewhere else. Maybe where the parsed contact is stored before in-dialog replies or where parsed contact is freed but not set to NULL/0.</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/3032#issuecomment-1042717843">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZOD2CQRG3JDGVCVX63U3S2RDANCNFSM5OR7DX2A">unsubscribe</a>.<br />Triage notifications on the go with GitHub Mobile for <a href="https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675">iOS</a> or <a href="https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub">Android</a>.
<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/ABO7UZLPBMJA5SUQWBRKOOTU3S2RDA5CNFSM5OR7DX2KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOHYTJZEY.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/3032/c1042717843</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/3032#issuecomment-1042717843",
"url": "https://github.com/kamailio/kamailio/pull/3032#issuecomment-1042717843",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>