diff options
| author | green <dandelions@disroot.org> | 2026-03-18 16:00:39 +0100 |
|---|---|---|
| committer | green <dandelions@disroot.org> | 2026-03-18 16:00:39 +0100 |
| commit | 378287a8de4fad1d31bf9ee96e17243661c5ecf1 (patch) | |
| tree | 031ac42ec8a3c32846265d906cc85dc7b1c331b5 | |
| parent | a3cf0dbc5f01eea13490308287216c1bdaf97f51 (diff) | |
fix: memory leak in mastoapi_status()
| -rw-r--r-- | mastoapi.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -1219,10 +1219,11 @@ xs_dict *mastoapi_status(snac *snac, const xs_dict *msg) xs *accounts = xs_list_new(); if (actor) { - xs *d2 = xs_dict_new(); - object_get(actor, &d2); - xs *e_acct = mastoapi_account(snac, d2); - accounts = xs_list_append(accounts, e_acct); + xs *d2 = NULL; + if (valid_status(object_get(actor, &d2))) { + xs *e_acct = mastoapi_account(snac, d2); + accounts = xs_list_append(accounts, e_acct); + } } const xs_list *item = xs_dict_get(sfrl, nm); |