Cleanup data

FossilOrigin-Name: 629c8537277cf9905ad942148944ce97d5eb21451b667ce0a15436f679efee22
This commit is contained in:
nekobit 2022-11-01 15:14:07 +00:00
parent b42d23ca02
commit ce0cf6d3e4
3 changed files with 7 additions and 4 deletions

View file

@ -58,6 +58,6 @@ void mstdnt_cleanup(mastodont_t* data);
*/
void mstdnt_storage_cleanup(struct mstdnt_storage* storage);
void mstdnt_request_cb_cleanup(mstdnt_request_cb_t* data);
void mstdnt_request_cb_cleanup(mstdnt_request_cb_data* data);
#endif /* MASTODONT_H */

View file

@ -34,7 +34,10 @@ void mstdnt_storage_cleanup(struct mstdnt_storage* storage)
}
}
void mstdnt_request_cb_cleanup(mstdnt_request_cb_t* data)
void mstdnt_request_cb_cleanup(mstdnt_request_cb_data* data)
{
mstdnt_storage_cleanup(data->storage);
free(data->storage);
data->data_free_cb(data->data);
free(data);
}

View file

@ -165,5 +165,5 @@ cleanup:
/* Only free if params_query set */
if (args->params_query) mstdnt_free(url_query);
return res;
return 1;
}