X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=lib%2Fgraph%2Fgraph.c;h=5b5acae75054b481ef6ec1b44f05a95b2b100530;hb=49682acd61d65c4986fc2b61c13d7d7a2d28127e;hp=10dd1944e840808e7b9669b9b8761deca26e590e;hpb=c28d097c6679d7b46b79fd3b5bdf0853520f9740;p=babeltrace.git diff --git a/lib/graph/graph.c b/lib/graph/graph.c index 10dd1944..5b5acae7 100644 --- 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++; + /* + * 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);