diff options
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) | |||
| 1360 | /* returns an already downloaded actor */ | 1360 | /* returns an already downloaded actor */ |
| 1361 | { | 1361 | { |
| 1362 | int status = 200; | 1362 | int status = 200; |
| 1363 | xs_dict *d; | 1363 | xs_dict *d = NULL; |
| 1364 | 1364 | ||
| 1365 | if (strcmp(actor, snac1->actor) == 0) { | 1365 | if (strcmp(actor, snac1->actor) == 0) { |
| 1366 | /* this actor */ | 1366 | /* this actor */ |
| @@ -1388,8 +1388,10 @@ int actor_get(snac *snac1, const char *actor, xs_dict **data) | |||
| 1388 | } | 1388 | } |
| 1389 | 1389 | ||
| 1390 | /* read the object */ | 1390 | /* read the object */ |
| 1391 | if (!valid_status(status = object_get(actor, &d))) | 1391 | if (!valid_status(status = object_get(actor, &d))) { |
| 1392 | d = xs_free(d); | ||
| 1392 | return status; | 1393 | return status; |
| 1394 | } | ||
| 1393 | 1395 | ||
| 1394 | if (data) | 1396 | if (data) |
| 1395 | *data = d; | 1397 | *data = d; |