X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=lib%2Fplugin%2Fplugin-so.c;h=357a4ccd6feffa911007366fb7755fcecd148e7b;hb=db5504f973efded14c592f5404cce39c9b566329;hp=b875ad68953598b5a2217977e96725d3e136d54f;hpb=238b7404b66983c6ba15c3a44bfbf642f20bdabe;p=babeltrace.git diff --git a/lib/plugin/plugin-so.c b/lib/plugin/plugin-so.c index b875ad68..357a4ccd 100644 --- a/lib/plugin/plugin-so.c +++ b/lib/plugin/plugin-so.c @@ -148,6 +148,8 @@ void bt_plugin_so_shared_lib_handle_destroy(struct bt_object *obj) BT_LOGE("Cannot close GModule: %s: path=\"%s\"", g_module_error(), path); } + + shared_lib_handle->module = NULL; #ifndef NDEBUG } else { BT_LOGD("Not closing GModule because `BABELTRACE_NO_DLCLOSE=1`: " @@ -158,6 +160,7 @@ void bt_plugin_so_shared_lib_handle_destroy(struct bt_object *obj) if (shared_lib_handle->path) { g_string_free(shared_lib_handle->path, TRUE); + shared_lib_handle->path = NULL; } g_free(shared_lib_handle);