qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-block] [PATCH 11/42] job: Add job_delete()


From: Eric Blake
Subject: Re: [Qemu-block] [PATCH 11/42] job: Add job_delete()
Date: Wed, 16 May 2018 12:54:15 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0

On 05/09/2018 11:26 AM, Kevin Wolf wrote:
This moves freeing the Job object and its fields from block_job_unref()
to job_delete().

Signed-off-by: Kevin Wolf <address@hidden>
---
  include/qemu/job.h | 3 +++
  blockjob.c         | 3 +--
  job.c              | 6 ++++++
  3 files changed, 10 insertions(+), 2 deletions(-)


+
+void job_delete(Job *job)
+{
+    g_free(job->id);
+    g_free(job);
+}

Should this be free-like, acting as a no-op when job == NULL on input?

--
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org



reply via email to

[Prev in Thread] Current Thread [Next in Thread]