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

extjwt: don't free modes/umodes, they are taken care of by payload.

This commit is contained in:
Bram Matthys
2026-03-04 17:07:06 +01:00
parent c4c082d0b7
commit 87e4249a09
+1 -3
View File
@@ -838,7 +838,6 @@ char *extjwt_make_payload(Client *client, Channel *channel, struct extjwt_config
return NULL;
payload = json_object();
modes = json_array();
umodes = json_array();
json_object_set_new(payload, "exp", json_integer(TStime()+config->exp_delay));
@@ -856,6 +855,7 @@ char *extjwt_make_payload(Client *client, Channel *channel, struct extjwt_config
if (channel)
{ /* fill in channel information and user flags */
lp = find_membership_link(client->user->channel, channel);
modes = json_array();
if (lp)
{
modestring = lp->member_modes;
@@ -871,8 +871,6 @@ char *extjwt_make_payload(Client *client, Channel *channel, struct extjwt_config
json_object_set_new(payload, "cmodes", modes);
}
result = json_dumps(payload, JSON_COMPACT);
json_decref(modes);
json_decref(umodes);
json_decref(payload);
return result;
}