* component class is removed from this list, the shared library handle
* object's reference count falls to zero and the shared library is
* finally closed.
+ *
+ * We're not using a GLib linked list here because this destructor is
+ * called after GLib's thread-specific data is destroyed, which contains
+ * the allocated memory for GLib data structures (what's used by
+ * g_slice_alloc()).
*/
static
int status = BT_FUNC_STATUS_OK;
BT_ASSERT(shared_lib_handle);
- BT_LOGI("Creating shared library handle: path=\"%s\"", path);
+ BT_LOGI("Creating shared library handle: path=\"%s\"", path ? path : "(null)");
*shared_lib_handle = g_new0(struct bt_plugin_so_shared_lib_handle, 1);
if (!*shared_lib_handle) {
BT_LIB_LOGE_APPEND_CAUSE("Failed to allocate one shared library handle.");
BT_ASSERT(*shared_lib_handle || status != BT_FUNC_STATUS_OK);
if (*shared_lib_handle) {
BT_LOGI("Created shared library handle: path=\"%s\", addr=%p",
- path, *shared_lib_handle);
+ path ? path : "(null)", *shared_lib_handle);
}
return status;