X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=lib%2Fplugin%2Fplugin-so.c;h=1c3e348a04b759d07dcd5b56944fa99f84be37b7;hb=398454ed067b95215c7affbe265fd36edab931ee;hp=9208dc535bb967b60661c000d868e2b5648f6799;hpb=e1e02a22957d83adc526c016d5d3b978b8e6d26d;p=babeltrace.git diff --git a/lib/plugin/plugin-so.c b/lib/plugin/plugin-so.c index 9208dc53..1c3e348a 100644 --- a/lib/plugin/plugin-so.c +++ b/lib/plugin/plugin-so.c @@ -1130,7 +1130,8 @@ struct bt_plugin *bt_plugin_so_create_empty( } spec = plugin->spec_data; - spec->shared_lib_handle = bt_object_get_ref(shared_lib_handle); + spec->shared_lib_handle = shared_lib_handle; + bt_object_get_no_null_check(spec->shared_lib_handle); goto end; error: @@ -1498,7 +1499,8 @@ void bt_plugin_so_on_add_component_class(struct bt_plugin *plugin, BT_ASSERT(plugin->type == BT_PLUGIN_TYPE_SO); bt_list_add(&comp_class->node, &component_class_list); - comp_class->so_handle = bt_object_get_ref(spec->shared_lib_handle); + comp_class->so_handle = spec->shared_lib_handle; + bt_object_get_no_null_check(comp_class->so_handle); /* Add our custom destroy listener */ bt_component_class_add_destroy_listener(comp_class,