aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/include
diff options
context:
space:
mode:
authorAaron Rossetto <aaron.rossetto@ni.com>2020-10-16 09:19:26 -0500
committerAaron Rossetto <aaron.rossetto@ni.com>2020-10-22 15:01:15 -0500
commit5ea43897419aac8db824944abc764868232b45af (patch)
tree460138969706163bcef667c300451db636923d41 /host/lib/include
parenta51ccbba88d6a3f3012b84a1eed55725d41c7fd7 (diff)
downloaduhd-5ea43897419aac8db824944abc764868232b45af.tar.gz
uhd-5ea43897419aac8db824944abc764868232b45af.tar.bz2
uhd-5ea43897419aac8db824944abc764868232b45af.zip
graph: Re-fetch dst_node descriptor after src_node potential removal
The graph_t::disconnect(src_node, dst_node) function removes connections (edges) from src_node to dst_node in the graph, and then removes the nodes (vertices) if their degree is zero after removing the connections. Because removing a vertex from the graph invalidates vertex descriptors, the graph_t::_remove_node() function resynchronizes the node-to-vertex descriptor map after removing the vertex. However, in graph_t::disconnect(), the vertex descriptor corresponding to dst_node was not being refetched after the potential removal of src_node, which results in the incorrect removal of innocent nodes under certain circumstances. This commit ensures that the node-to-vertex descriptor is reconsulted for the vertex descriptor corresponding to dst_node before removing it from the tree.
Diffstat (limited to 'host/lib/include')
0 files changed, 0 insertions, 0 deletions