<p><b>@urtho</b> commented on this pull request.</p>
<hr>
<p>In <a href="https://github.com/kamailio/kamailio/pull/2016#discussion_r307996653">src/modules/async/async_sleep.c</a>:</p>
<pre style='color:#555'>> + t = tmb.t_gett();
+ if(t == NULL || t == T_UNDEFINED) {
+ if(tmb.t_newtran(msg) < 0) {
+ LM_ERR("cannot create the transaction\n");
+ return -1;
+ }
+ t = tmb.t_gett();
+ if(t == NULL || t == T_UNDEFINED) {
+ LM_ERR("cannot lookup the transaction\n");
+ return -1;
+ }
+ }
+
+ if(tmb.t_suspend(msg, &tindex, &tlabel) < 0) {
+ LM_ERR("failed to suspend the processing\n");
+ shm_free(ai);
</pre>
<p>The allocation is done too early. Moving it past all the input and transaction validation.</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/2016?email_source=notifications&email_token=ABO7UZNF5HBV32PXZNBGCL3QBV5EFA5CNFSM4IHKWVP2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOB7Y35HA#discussion_r307996653">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZKYJXSNOSWZW54LYITQBV5EFANCNFSM4IHKWVPQ">mute the thread</a>.<img src="https://github.com/notifications/beacon/ABO7UZMF2VRZKTCL4XY2NG3QBV5EFA5CNFSM4IHKWVP2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOB7Y35HA.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/2016?email_source=notifications\u0026email_token=ABO7UZNF5HBV32PXZNBGCL3QBV5EFA5CNFSM4IHKWVP2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOB7Y35HA#discussion_r307996653",
"url": "https://github.com/kamailio/kamailio/pull/2016?email_source=notifications\u0026email_token=ABO7UZNF5HBV32PXZNBGCL3QBV5EFA5CNFSM4IHKWVP2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOB7Y35HA#discussion_r307996653",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>