From fd61a701f1de8e4c1d89b3716ba9ca749cf5c724 Mon Sep 17 00:00:00 2001 From: Kevin Wolf Date: Thu, 12 Apr 2018 19:06:53 +0200 Subject: job: Add job_delete() This moves freeing the Job object and its fields from block_job_unref() to job_delete(). Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz Reviewed-by: John Snow --- blockjob.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'blockjob.c') diff --git a/blockjob.c b/blockjob.c index ea71ec0..430a67b 100644 --- a/blockjob.c +++ b/blockjob.c @@ -261,9 +261,8 @@ void block_job_unref(BlockJob *job) block_job_detach_aio_context, job); blk_unref(job->blk); error_free(job->blocker); - g_free(job->job.id); assert(!timer_pending(&job->sleep_timer)); - g_free(job); + job_delete(&job->job); } } -- cgit v1.1