OSDN Git Service

qom: object: Ignore refs/unrefs of NULL
authorPeter Crosthwaite <peter.crosthwaite@xilinx.com>
Fri, 6 Jun 2014 06:13:36 +0000 (23:13 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 1 Jul 2014 08:20:41 +0000 (10:20 +0200)
commit8ffad850ef5ae14287d0e185d478c9a35820482c
tree6d3f53dde07032ba978b4d05d59edc7a1e6e7bbe
parentc28322d10cd5f0529605b48684d2b82c9eb9c020
qom: object: Ignore refs/unrefs of NULL

Just do nothing if passed NULL for a ref or unref. This avoids
call sites that manage a combination of NULL or non-NULL pointers
having to add iffery around every ref and unref.

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
qom/object.c