From f8df5f922152a47b3889921d249e00dab766d950 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Wed, 14 Dec 2016 22:42:55 +0300 Subject: container: don't leak container reference MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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é --- qom/container.c | 1 + 1 file changed, 1 insertion(+) (limited to 'qom/container.c') diff --git a/qom/container.c b/qom/container.c index c9eb49b..f6ccaf7 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); } } -- cgit v1.1