qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 10/16] qom: release previous object when setting


From: Corey Minyard
Subject: Re: [Qemu-devel] [PATCH 10/16] qom: release previous object when setting
Date: Mon, 16 Jul 2012 19:07:06 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120615 Thunderbird/13.0.1

On 07/16/2012 01:24 AM, Paolo Bonzini wrote:
Il 15/07/2012 22:25, address@hidden ha scritto:
From: Corey Minyard <address@hidden>

When setting an object, if you don't release the previous object
that was there, it may become unusable.  This change allows a
chardev to be removed from one object's properties and added to
another's.
---
  qom/object.c |    2 ++
  1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/qom/object.c b/qom/object.c
index 00bb3b0..484dc77 100644
--- a/qom/object.c
+++ b/qom/object.c
@@ -731,6 +731,8 @@ void object_property_set(Object *obj, Visitor *v, const 
char *name,
      if (!prop->set) {
          error_set(errp, QERR_PERMISSION_DENIED);
      } else {
+       if (prop->release)
+           prop->release(obj, name, prop->opaque);
          prop->set(obj, v, prop->opaque, name, errp);
      }
  }

Acked-by: Paolo Bonzini <address@hidden>

... but you need to run scripts/checkpatch.pl on your patches to conform
to coding style.
Ok. I'm running everything through the script. I didn't realize the coding standard was that different from Linux.

Thanks,

-corey




reply via email to

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