diff --git a/src/import/pull-job.c b/src/import/pull-job.c index bd42118042..ef1da55af0 100644 --- a/src/import/pull-job.c +++ b/src/import/pull-job.c @@ -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); } diff --git a/src/import/pull-job.h b/src/import/pull-job.h index 41dc567428..0805184600 100644 --- a/src/import/pull-job.h +++ b/src/import/pull-job.h @@ -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;