Fix: plugin-so.c: dereference after `NULL` check
[babeltrace.git] / src / lib / plugin / plugin-so.c
index ae7955986f6b9cba1d4198127a790f2433d07d9a..24590cf2041d985237292cfde7e4f23a534ecf25 100644 (file)
@@ -1286,6 +1286,7 @@ int bt_plugin_so_create_all_from_sections(
        size_t cc_descr_attrs_count;
        size_t i;
 
+       BT_ASSERT(shared_lib_handle);
        BT_ASSERT(plugin_set_out);
        *plugin_set_out = NULL;
        descriptor_count = count_non_null_items_in_section(descriptors_begin, descriptors_end);
@@ -1350,7 +1351,7 @@ int bt_plugin_so_create_all_from_sections(
                        goto error;
                }
 
-               if (shared_lib_handle && shared_lib_handle->path) {
+               if (shared_lib_handle->path) {
                        bt_plugin_set_path(plugin,
                                shared_lib_handle->path->str);
                }
This page took 0.024062 seconds and 4 git commands to generate.