unicorn/qemu
Igor Mammedov 943b9fc261
qdev: Fix object reference leak in case device.realize() fails
If device doesn't have parent assined before its realize
is called, device_set_realized() will implicitly set parent
to '/machine/unattached'.

However device_set_realized() may fail after that point at
several other points leaving not realized object dangling
in '/machine/unattached' and as result caller of

obj = object_new()
obj->ref == 1
object_property_set_bool(obj,..., true, "realized",...)
obj->ref == 2
if (fail)
object_unref(obj);
obj->ref == 1

will get object leak instead of expected object destruction.

Fix it by making device_set_realized() to cleanup after itself
in case of failure.

Backports commit 69382d8b3e8600b349c191394d761dcb480502cf from qemu
2018-02-25 21:00:26 -05:00
..
crypto
default-configs
docs
fpu softfloat: Handle snan_bit_is_one == 0 in MIPS pickNaNMulAdd() 2018-02-24 20:40:11 -05:00
hw qdev: Fix object reference leak in case device.realize() fails 2018-02-25 21:00:26 -05:00
include exec: Reduce CONFIG_USER_ONLY ifdeffenery 2018-02-25 20:57:48 -05:00
qapi qapi: change QmpInputVisitor to QSLIST 2018-02-25 20:02:09 -05:00
qobject
qom qapi: Add new visit_complete() function 2018-02-25 01:20:03 -05:00
scripts qapi: Implement boxed types for commands/events 2018-02-25 20:22:03 -05:00
target-arm target-arm: Add missed AArch32 TLBI sytem registers 2018-02-25 19:59:15 -05:00
target-i386 target-i386: Add x86_cpu_unrealizefn() 2018-02-25 20:54:13 -05:00
target-m68k target-*: Clean up cpu.h header guards 2018-02-25 04:12:46 -05:00
target-mips Clean up ill-advised or unusual header guards 2018-02-25 04:22:46 -05:00
target-sparc target-sparc: Elide duplicate updates to fprs 2018-02-25 19:14:59 -05:00
tcg compiler: never omit assertions if using a static analysis tool 2018-02-25 19:19:28 -05:00
util target-arm: Use Neon for zero checking 2018-02-25 19:17:38 -05:00
aarch64.h header_gen: alphabetize general symbols 2018-02-25 19:07:20 -05:00
aarch64eb.h header_gen: alphabetize general symbols 2018-02-25 19:07:20 -05:00
accel.c
arm.h header_gen: alphabetize general symbols 2018-02-25 19:07:20 -05:00
armeb.h header_gen: alphabetize general symbols 2018-02-25 19:07:20 -05:00
CODING_STYLE
configure configure: Enable -Werror for MinGW builds, too 2018-02-24 18:56:05 -05:00
COPYING
COPYING.LIB
cpu-exec-common.c
cpu-exec.c
cpus.c
cputlb.c cputlb: Add address parameter to VICTIM_TLB_HIT 2018-02-25 03:03:36 -05:00
exec.c exec: avoid realloc in phys_map_node_reserve 2018-02-25 19:32:40 -05:00
gen_all_header.sh
glib_compat.c qapi: Fix memleak in string visitors on int lists 2018-02-25 00:20:34 -05:00
HACKING
header_gen.py header_gen: alphabetize general symbols 2018-02-25 19:07:20 -05:00
ioport.c
LICENSE
m68k.h header_gen: alphabetize general symbols 2018-02-25 19:07:20 -05:00
Makefile
Makefile.objs
Makefile.target
memory.c memory: Provide memory_region_init_rom() 2018-02-25 00:28:17 -05:00
memory_mapping.c
mips.h header_gen: alphabetize general symbols 2018-02-25 19:07:20 -05:00
mips64.h header_gen: alphabetize general symbols 2018-02-25 19:07:20 -05:00
mips64el.h header_gen: alphabetize general symbols 2018-02-25 19:07:20 -05:00
mipsel.h header_gen: alphabetize general symbols 2018-02-25 19:07:20 -05:00
powerpc.h header_gen: alphabetize general symbols 2018-02-25 19:07:20 -05:00
qapi-schema.json
qemu-log.c
qemu-timer.c
rules.mak
softmmu_template.h cputlb: Fix for self-modifying writes across page boundaries 2018-02-25 03:12:11 -05:00
sparc.h header_gen: alphabetize general symbols 2018-02-25 19:07:20 -05:00
sparc64.h header_gen: alphabetize general symbols 2018-02-25 19:07:20 -05:00
tcg-runtime.c
translate-all.c translate-all: Fix user-mode self-modifying code in 2 page long TB 2018-02-25 03:14:22 -05:00
translate-all.h
translate-common.c
unicorn_common.h
VERSION
vl.c
vl.h
x86_64.h header_gen: alphabetize general symbols 2018-02-25 19:07:20 -05:00