Fix: do not use BT_MOVE() when the destination memory could be uninitialized
[babeltrace.git] / lib / graph / graph.c
index 1dc7b819c9db02c69d7a3985aca4c0ebb45cfb44..10dd1944e840808e7b9669b9b8761deca26e590e 100644 (file)
@@ -405,7 +405,9 @@ enum bt_graph_status bt_graph_connect_ports(struct bt_graph *graph,
                downstream_port, bt_port_get_name(downstream_port));
 
        if (user_connection) {
-               BT_MOVE(*user_connection, connection);
+               /* Move reference to user */
+               *user_connection = connection;
+               connection = NULL;
        }
 
 end:
This page took 0.023866 seconds and 4 git commands to generate.