From: Jérémie Galarneau Date: Thu, 25 Feb 2016 17:31:26 +0000 (-0500) Subject: Take ownership of component class in bt_component_source_create X-Git-Url: http://git.efficios.com/?a=commitdiff_plain;h=aab65362756c4e53dd97ae7f12ff22aa2dc07663;p=deliverable%2Fbabeltrace.git Take ownership of component class in bt_component_source_create Signed-off-by: Jérémie Galarneau --- 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;