projects
/
babeltrace.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
lib: plugin: reset pointers to `NULL` on destruction
[babeltrace.git]
/
lib
/
plugin
/
plugin-so.c
diff --git
a/lib/plugin/plugin-so.c
b/lib/plugin/plugin-so.c
index b875ad68953598b5a2217977e96725d3e136d54f..357a4ccd6feffa911007366fb7755fcecd148e7b 100644
(file)
--- 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);
}
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`: "
#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);
if (shared_lib_handle->path) {
g_string_free(shared_lib_handle->path, TRUE);
+ shared_lib_handle->path = NULL;
}
g_free(shared_lib_handle);
}
g_free(shared_lib_handle);
This page took
0.023433 seconds
and
4
git commands to generate.