Cleanup relationships function

FossilOrigin-Name: fa605e90ee89abef5bbe42be95e091c70a2e55446bd6262adefb1c3a8802f853
This commit is contained in:
me@ow.nekobit.net 2022-04-05 03:30:54 +00:00
parent b1c40c9a64
commit eaad95a07a
2 changed files with 8 additions and 0 deletions

View file

@ -60,4 +60,6 @@ int mastodont_get_relationships(mastodont_t* data,
struct mstdnt_relationship* relationships[],
size_t* size);
void mstdnt_cleanup_relationships(struct mstdnt_relationship* rels);
#endif /* MASTODONT_RELATIONSHIP_H */

View file

@ -143,3 +143,9 @@ int mastodont_get_relationships(mastodont_t* data,
return mastodont_request(data, &req_args);
}
void mstdnt_cleanup_relationships(struct mstdnt_relationship* rels)
{
if (!rels) return;
free(rels);
}