diff options
| author | 2026-03-18 20:39:45 +0100 | |
|---|---|---|
| committer | 2026-03-18 20:39:45 +0100 | |
| commit | 72be32d06fc6ea5a8fba944fe9b3305873810f67 (patch) | |
| tree | 3d36f8b0794d743aed5111c384d66c8fc4a044a3 | |
| parent | If latitude or longitude are not numbers, use them as string. (diff) | |
| parent | fix: memory leak in mastoapi_status() (diff) | |
| download | snac2-72be32d06fc6ea5a8fba944fe9b3305873810f67.tar.gz snac2-72be32d06fc6ea5a8fba944fe9b3305873810f67.tar.xz snac2-72be32d06fc6ea5a8fba944fe9b3305873810f67.zip | |
Merge pull request 'Another memory leak in emoji reaction code' (#586) from dandelions/snac2:pr-leak-mastoapi into masterHEADmaster
Reviewed-on: https://codeberg.org/grunfink/snac2/pulls/586
| -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) | |||
| 1219 | 1219 | ||
| 1220 | xs *accounts = xs_list_new(); | 1220 | xs *accounts = xs_list_new(); |
| 1221 | if (actor) { | 1221 | if (actor) { |
| 1222 | xs *d2 = xs_dict_new(); | 1222 | xs *d2 = NULL; |
| 1223 | object_get(actor, &d2); | 1223 | if (valid_status(object_get(actor, &d2))) { |
| 1224 | xs *e_acct = mastoapi_account(snac, d2); | 1224 | xs *e_acct = mastoapi_account(snac, d2); |
| 1225 | accounts = xs_list_append(accounts, e_acct); | 1225 | accounts = xs_list_append(accounts, e_acct); |
| 1226 | } | ||
| 1226 | } | 1227 | } |
| 1227 | 1228 | ||
| 1228 | const xs_list *item = xs_dict_get(sfrl, nm); | 1229 | const xs_list *item = xs_dict_get(sfrl, nm); |