From: Marc-André Lureau Date: Wed, 14 Dec 2016 19:42:55 +0000 (+0300) Subject: container: don't leak container reference X-Git-Tag: v2.10.0-rc0~211^2~17 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=f8df5f922152a47b3889921d249e00dab766d950;p=users%2Fdwmw2%2Fqemu.git container: don't leak container reference object_property_add_child() references the child, unref it after to avoid ref leaks. Signed-off-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé --- diff --git a/qom/container.c b/qom/container.c index c9eb49b01e..f6ccaf7ea7 100644 --- 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); } }