Commit ce95c694d0d3a388fa071650568993462d519527

Stefan Sperling 2018-11-18T23:30:14

remove unreachable code

diff --git a/lib/commit_graph.c b/lib/commit_graph.c
index 60d49e5..bab4b0a 100644
--- a/lib/commit_graph.c
+++ b/lib/commit_graph.c
@@ -444,16 +444,10 @@ add_node(struct got_commit_graph_node **new_node, int *changed,
 		}
 	}
 
-	if (err) {
-		got_object_idset_remove(NULL, graph->node_ids, &node->id);
-		free_node(node);
-	} else {
-		if (*changed)
-			add_node_to_iter_list(graph, node, child_node);
-		*new_node = node;
-	}
-
-	return err;
+	if (*changed)
+		add_node_to_iter_list(graph, node, child_node);
+	*new_node = node;
+	return NULL;
 }
 
 const struct got_error *