mirror of
https://github.com/unrealircd/unrealircd.git
synced 2026-07-05 04:13:14 +02:00
58db5b0845
including Lord255, armyn and others. The issue was not there when running with ASan, which is why it was non-reproducible for so long. Valgrind picked it up correctly. The bug was that in rpc_response() and rpc_error() I do: id = json_object_get(request, "id"); [..] json_object_set_new(j, "id", id); which is wrong, since json_object_get() "borrows the reference" and json_object_set_new "steals the reference". In this particular case it should be: json_object_set(j, "id", id); Fixed in both functions. Would have to audit the code if the mistake is made elsewhere too though. On first sight, it seems not.