commit 932b646a7df3d0578f831622f02348a768cb07bc from: Stefan Sperling date: Mon Sep 05 09:36:55 2022 UTC replace an indirect call to idset_add(), via add_node(), with a direct call Avoids leaking the node structure returned from add_node(). ok op@ commit - 04666d1a54c25c8be7e39bc628b4a80f3376c127 commit + 932b646a7df3d0578f831622f02348a768cb07bc blob - ae6de06b406405893b822d52382ee6165539e3b3 blob + 793795838b82267e63c1ce81996fa76ad63f3860 --- lib/commit_graph.c +++ lib/commit_graph.c @@ -213,8 +213,6 @@ packed_first_parent_traversal(int *ncommits_traversed, /* Add all traversed commits to the graph... */ STAILQ_FOREACH(qid, &traversed_commits, entry) { - struct got_commit_graph_node *node; - if (got_object_idset_contains(graph->open_branches, &qid->id)) continue; if (got_object_idset_contains(graph->node_ids, &qid->id)) @@ -229,7 +227,7 @@ packed_first_parent_traversal(int *ncommits_traversed, break; } - err = add_node(&node, graph, &qid->id, repo); + err = got_object_idset_add(graph->node_ids, &qid->id, NULL); if (err) break; }