projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
315dd72
)
container: don't leak container reference
author
Marc-André Lureau
<marcandre.lureau@redhat.com>
Wed, 14 Dec 2016 19:42:55 +0000
(22:42 +0300)
committer
Marc-André Lureau
<marcandre.lureau@redhat.com>
Thu, 4 May 2017 11:34:41 +0000
(15:34 +0400)
object_property_add_child() references the child, unref it after to
avoid ref leaks.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
qom/container.c
patch
|
blob
|
history
diff --git
a/qom/container.c
b/qom/container.c
index c9eb49b01edb3a373366c159da0e57b318231933..f6ccaf7ea780349e9fac89dea8384cfc0f6fb429 100644
(file)
--- a/
qom/container.c
+++ b/
qom/container.c
@@
-40,6
+40,7
@@
Object *container_get(Object *root, const char *path)
if (!child) {
child = object_new("container");
object_property_add_child(obj, parts[i], child, NULL);
+ object_unref(child);
}
}