pull-job: optionally free userdata when we destroy a PullJob

This commit is contained in:
Lennart Poettering
2026-02-19 15:05:14 +01:00
parent 4a886d9ab4
commit 98b714e0cb
2 changed files with 5 additions and 0 deletions
+3
View File
@@ -62,6 +62,9 @@ PullJob* pull_job_unref(PullJob *j) {
iovec_done(&j->expected_checksum);
free(j->content_type);
if (j->free_userdata)
j->free_userdata(j->userdata);
return mfree(j);
}
+2
View File
@@ -36,6 +36,8 @@ typedef struct PullJob {
char *url;
void *userdata;
free_func_t free_userdata;
PullJobFinished on_finished;
PullJobOpenDisk on_open_disk;
PullJobHeader on_header;