mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-10 03:50:38 +03:00
Ensure no actor data is left in actor_get().
This commit is contained in:
parent
18f799a58f
commit
cf2b334d86
6
data.c
6
data.c
@ -1360,7 +1360,7 @@ int actor_get(snac *snac1, const char *actor, xs_dict **data)
|
|||||||
/* returns an already downloaded actor */
|
/* returns an already downloaded actor */
|
||||||
{
|
{
|
||||||
int status = 200;
|
int status = 200;
|
||||||
xs_dict *d;
|
xs_dict *d = NULL;
|
||||||
|
|
||||||
if (strcmp(actor, snac1->actor) == 0) {
|
if (strcmp(actor, snac1->actor) == 0) {
|
||||||
/* this actor */
|
/* this actor */
|
||||||
@ -1388,8 +1388,10 @@ int actor_get(snac *snac1, const char *actor, xs_dict **data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* read the object */
|
/* 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;
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
if (data)
|
if (data)
|
||||||
*data = d;
|
*data = d;
|
||||||
|
Loading…
Reference in New Issue
Block a user