diff options
author | default <nobody@localhost> | 2023-05-03 08:15:38 +0200 |
---|---|---|
committer | default <nobody@localhost> | 2023-05-03 08:15:38 +0200 |
commit | cf2b334d86e8b4ccd0525fbb741fbbaf86a2c618 (patch) | |
tree | 6fc508f031a10e067bcf26f3c6cf926074b4bf15 /data.c | |
parent | 18f799a58fc7516012751abb0b371ba5420ac12b (diff) |
Ensure no actor data is left in actor_get().
Diffstat (limited to 'data.c')
-rw-r--r-- | data.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -1360,7 +1360,7 @@ int actor_get(snac *snac1, const char *actor, xs_dict **data) /* returns an already downloaded actor */ { int status = 200; - xs_dict *d; + xs_dict *d = NULL; if (strcmp(actor, snac1->actor) == 0) { /* this actor */ @@ -1388,8 +1388,10 @@ int actor_get(snac *snac1, const char *actor, xs_dict **data) } /* read the object */ - if (!valid_status(status = object_get(actor, &d))) + if (!valid_status(status = object_get(actor, &d))) { + d = xs_free(d); return status; + } if (data) *data = d; |