<p></p>
<p dir="auto">It is crashing because current->mname is NULL. I dont know how it could be NULL but will try to figure it out.</p>
<p dir="auto">Suggestion :<br>
I think we should check if current->mname is not NULL before strcmp for protection from crash</p>
<pre class="notranslate"><code class="notranslate">static int rpc_mod_is_printed_one(mem_counter *stats, mem_counter *current) {
        mem_counter *iter = stats;

        while (iter && iter != current) {
                if (strcmp(iter->mname, current->mname) == 0) {
                        return 1;
                }
                iter = iter->next;
        }

        return 0;
}
</code></pre>
<p dir="auto"><a href="https://github.com/kamailio/kamailio/blob/c5d48f8ee3884934bd8b910a2dae1888fead3cf1/src/modules/kex/mod_stats.c#L87">https://github.com/kamailio/kamailio/blob/c5d48f8ee3884934bd8b910a2dae1888fead3cf1/src/modules/kex/mod_stats.c#L87</a></p>
<p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/miconda/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/miconda">@miconda</a> Can you please help me with some direction to debug this issue ? And do you agree with my suggestion to add protection ?</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/issues/3186#issuecomment-1228505656">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZNWTXAIQ22PMYJDTTLV3DCTDANCNFSM53NR7AGA">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/ABO7UZNN6XUF7Y2YCQV6ZFTV3DCTDA5CNFSM53NR7AGKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOJE4YEOA.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/issues/3186/1228505656</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/issues/3186#issuecomment-1228505656",
"url": "https://github.com/kamailio/kamailio/issues/3186#issuecomment-1228505656",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>