projects
/
babeltrace.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Cancel the graph on destruction
[babeltrace.git]
/
lib
/
graph
/
graph.c
diff --git
a/lib/graph/graph.c
b/lib/graph/graph.c
index 10dd1944e840808e7b9669b9b8761deca26e590e..5b5acae75054b481ef6ec1b44f05a95b2b100530 100644
(file)
--- a/
lib/graph/graph.c
+++ b/
lib/graph/graph.c
@@
-80,6
+80,12
@@
void bt_graph_destroy(struct bt_object *obj)
BT_LOGD("Destroying graph: addr=%p", graph);
obj->ref_count.count++;
BT_LOGD("Destroying graph: addr=%p", graph);
obj->ref_count.count++;
+ /*
+ * Cancel the graph to disallow some operations, like creating
+ * notification iterators and adding ports to components.
+ */
+ (void) bt_graph_cancel(graph);
+
if (graph->connections) {
BT_LOGD_STR("Destroying connections.");
g_ptr_array_free(graph->connections, TRUE);
if (graph->connections) {
BT_LOGD_STR("Destroying connections.");
g_ptr_array_free(graph->connections, TRUE);
This page took
0.02337 seconds
and
4
git commands to generate.