From aab65362756c4e53dd97ae7f12ff22aa2dc07663 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Thu, 25 Feb 2016 12:31:26 -0500 Subject: [PATCH] Take ownership of component class in bt_component_source_create MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérémie Galarneau --- lib/plugin-system/source.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/plugin-system/source.c b/lib/plugin-system/source.c index e4915a988..97992aac5 100644 --- a/lib/plugin-system/source.c +++ b/lib/plugin-system/source.c @@ -52,7 +52,8 @@ struct bt_component *bt_component_source_create( goto end; } - ret = bt_component_init(&source->parent, bt_component_source_destroy); + source->parent.class = bt_get(class); + ret = bt_component_init(&source->parent, NULL); if (ret != BT_COMPONENT_STATUS_OK) { BT_PUT(source); goto end; -- 2.34.1