summaryrefslogtreecommitdiff
path: root/activitypub.c
diff options
context:
space:
mode:
authordefault <nobody@localhost>2022-09-23 21:01:35 +0200
committerdefault <nobody@localhost>2022-09-23 21:01:35 +0200
commitb4a4fa0b0d02747c231367dc7a609c96171b7066 (patch)
tree9686860396752dcf7c61298973181d8e887aa3bb /activitypub.c
parent6e6c3154940e21a97473154e57e851790740d550 (diff)
Fixed memleak.
Diffstat (limited to 'activitypub.c')
-rw-r--r--activitypub.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/activitypub.c b/activitypub.c
index 7c302bb..bdee395 100644
--- a/activitypub.c
+++ b/activitypub.c
@@ -190,12 +190,14 @@ int activitypub_get_handler(d_char *req, char *q_path,
else
if (strcmp(p_path, "followers") == 0 || strcmp(p_path, "following") == 0) {
xs *id = xs_fmt("%s/%s", snac.actor, p_path);
+ xs *ol = xs_list_new();
+ xs *nz = xs_number_new(0);
msg = xs_dict_append(msg, "@context", "https:/" "/www.w3.org/ns/activitystreams");
msg = xs_dict_append(msg, "attributedTo", snac.actor);
msg = xs_dict_append(msg, "id", id);
- msg = xs_dict_append(msg, "orderedItems", xs_list_new());
- msg = xs_dict_append(msg, "totalItems", xs_number_new(0));
+ msg = xs_dict_append(msg, "orderedItems", ol);
+ msg = xs_dict_append(msg, "totalItems", nz);
msg = xs_dict_append(msg, "type", "OrderedCollection");
}
else