1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-06-12 17:14:46 +02:00

Fix leak if central-blocklist returns "error" JSON string (very rare)

This commit is contained in:
Bram Matthys
2026-02-21 13:45:47 +01:00
parent 5580b294f4
commit f59b937f3b
+2 -1
View File
@@ -954,6 +954,7 @@ void cbl_download_complete(OutgoingWebRequest *request, OutgoingWebResponse *res
if ((str = json_object_get_string(result, "error")))
{
cbl_error_response(transfer, str);
json_decref(result);
return;
}
@@ -972,8 +973,8 @@ void cbl_download_complete(OutgoingWebRequest *request, OutgoingWebResponse *res
responses = json_object_get(result, "responses");
if (!responses)
{
json_decref(result);
cbl_error_response(transfer, "no spam scores calculated for users");
json_decref(result);
return; /* Nothing to do */
}