<p><b>@miconda</b> commented on this pull request.</p>

<hr>

<p>In <a href="https://github.com/kamailio/kamailio/pull/2190#discussion_r363392677">src/modules/userblacklist/userblacklist.c</a>:</p>
<pre style='color:#555'>> +            LM_ERR("no table name\n");
+               return -1;
+       }
+       /* try to add the table */
+       if (add_source(table) != 0) {
+               LM_ERR("could not add table");
+               return -1;
+       }
+
+       gnode = table2dt(table);
+       if (!gnode) {
+               LM_ERR("invalid table '%s'\n", table);
+               return -1;
+       }
+
+       arg = pkg_malloc(sizeof(struct check_blacklist_fs_t));
</pre>
<p>The <code>arg</code> is allocated in pkg, shouldn't it be freed after the call of <code>check_blackist()</code>? There are similar cases in the other functions. I am not familiar with the code of the module, but upon quick check there are at least some error cases inside <code>check_blackist()</code> that just return back without any pkg free.</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/2190?email_source=notifications&email_token=ABO7UZOPUMBRQDOMTD3IL23Q4NRWHA5CNFSM4KDHEHIKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCQYU4XA#pullrequestreview-338775644">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZNLF6NPWB72YVRAXGLQ4NRWHANCNFSM4KDHEHIA">unsubscribe</a>.<img src="https://github.com/notifications/beacon/ABO7UZJPLACKENQ6X73TPILQ4NRWHA5CNFSM4KDHEHIKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCQYU4XA.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/2190?email_source=notifications\u0026email_token=ABO7UZOPUMBRQDOMTD3IL23Q4NRWHA5CNFSM4KDHEHIKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCQYU4XA#pullrequestreview-338775644",
"url": "https://github.com/kamailio/kamailio/pull/2190?email_source=notifications\u0026email_token=ABO7UZOPUMBRQDOMTD3IL23Q4NRWHA5CNFSM4KDHEHIKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCQYU4XA#pullrequestreview-338775644",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>