From 2903b29e653d8549319ceabbb65de408d2e5c073 Mon Sep 17 00:00:00 2001 From: grunfink Date: Thu, 18 Dec 2025 08:58:04 +0100 Subject: Fixed more minor leaks. --- html.c | 3 ++- mastoapi.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/html.c b/html.c index 48273f2..8700ac4 100644 --- a/html.c +++ b/html.c @@ -2454,8 +2454,8 @@ xs_html *html_entry(snac *user, xs_dict *msg, int read_only, xs *sfrl = xs_dict_new(); xs *rl = object_get_emoji_reacts(id); - xs_dict *m = NULL; while (xs_list_next(rl, &v, &c)) { + xs *m = NULL; if (valid_status(object_get_by_md5(v, &m))) { const char *content = xs_dict_get(m, "content"); const char *actor = xs_dict_get(m, "actor"); @@ -2490,6 +2490,7 @@ xs_html *html_entry(snac *user, xs_dict *msg, int read_only, c = 0; while (xs_list_next(rl, &k, &c)) { + xs *m = NULL; if (valid_status(object_get_by_md5(k, &m))) { const xs_dict *tag = xs_dict_get(m, "tag"); const xs_dict *ide = xs_dict_get(m, "id"); diff --git a/mastoapi.c b/mastoapi.c index 72379b5..041f37e 100644 --- a/mastoapi.c +++ b/mastoapi.c @@ -1165,8 +1165,8 @@ xs_dict *mastoapi_status(snac *snac, const xs_dict *msg) int c = 0; const char *v; - xs_dict *msg = NULL; while (xs_list_next(rl, &v, &c)) { + xs *msg = NULL; if (valid_status(object_get_by_md5(v, &msg))) { const char *content = xs_dict_get(msg, "content"); const char *actor = xs_dict_get(msg, "actor"); @@ -1194,6 +1194,7 @@ xs_dict *mastoapi_status(snac *snac, const xs_dict *msg) c = 0; while (xs_list_next(rl, &v, &c)) { + xs *msg = NULL; if (valid_status(object_get_by_md5(v, &msg))) { xs *d1 = xs_dict_new(); -- cgit v1.2.3