commit 2ab428ab0a147c5cb1044a10c6a9e22af40b525a
parent fa870ab358ce94017228cdddf4697e041fc32531
Author: default <nobody@localhost>
Date: Tue, 25 Oct 2022 10:19:42 +0200
Fixed leak.
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/activitypub.c b/activitypub.c
@@ -1043,8 +1043,9 @@ int activitypub_get_handler(d_char *req, char *q_path,
}
/* replace the 'orderedItems' with the latest posts */
+ xs *items = xs_number_new(xs_list_len(list));
msg = xs_dict_set(msg, "orderedItems", list);
- msg = xs_dict_set(msg, "totalItems", xs_number_new(xs_list_len(list)));
+ msg = xs_dict_set(msg, "totalItems", items);
}
else
if (strcmp(p_path, "followers") == 0 || strcmp(p_path, "following") == 0) {