There are two problems with QOM link properties: 1. There are refcount leaks in many object_property_add_link() callers. 2. There is no way to prevent link properties from being set after a device is realized.
This patch series fixes these issues by extending the object_property_add_link() function. Stefan Hajnoczi (4): qom: split object_property_set_link() qom: make QOM link property unref optional qom: add set() argument to object_property_add_link() virtio-rng: avoid default_backend refcount leak hw/core/qdev-properties.c | 12 ++++ hw/core/qdev.c | 9 ++- hw/dma/xilinx_axidma.c | 16 ++++-- hw/net/xilinx_axienet.c | 16 ++++-- hw/pcmcia/pxa2xx.c | 5 +- hw/s390x/s390-virtio-bus.c | 4 +- hw/s390x/virtio-ccw.c | 4 +- hw/virtio/virtio-pci.c | 4 +- hw/virtio/virtio-rng.c | 7 ++- include/hw/qdev-properties.h | 11 ++++ include/qom/object.h | 19 ++++++- qom/object.c | 128 ++++++++++++++++++++++++++++++++----------- ui/console.c | 4 +- 13 files changed, 190 insertions(+), 49 deletions(-) -- 1.8.5.3