commit - 9ea55f08a2fdb3e7018231c9fe4014c758a0b69a
commit + 6227cf0ee49b322cc297ef95bdad09ea8eae2ec4
blob - 76816f00e1861046d23bfcd7dc01706f222e7f5c
blob + 1595b111128cb8eaca43db33c9b1eab5a5ff4291
--- gotwebd/got_operations.c
+++ gotwebd/got_operations.c
goto done;
for (;;) {
+ struct got_object_id *next_id;
+
if (limit_chk == ((limit * qs->page) - (limit - 1)) &&
commit_found == 0 && repo_commit &&
repo_commit->commit_id != NULL) {
}
}
- error = got_commit_graph_iter_next(&id, graph, repo, NULL,
+ error = got_commit_graph_iter_next(&next_id, graph, repo, NULL,
NULL);
if (error) {
if (error->code == GOT_ERR_ITER_COMPLETED)
error = NULL;
- goto done;
- }
- if (id == NULL)
goto done;
+ }
- error = got_object_open_as_commit(&commit, repo, id);
+ error = got_object_open_as_commit(&commit, repo, next_id);
if (error)
goto done;
TAILQ_INSERT_TAIL(&t->repo_commits, repo_commit, entry);
error = got_get_repo_commit(c, repo_commit, commit,
- &refs, id);
+ &refs, next_id);
if (error)
goto done;
commit_found = 1;
else {
limit_chk++;
- free(id);
- id = NULL;
continue;
}
}
- free(id);
- id = NULL;
-
if (limit == 1 && chk_multi == 0 &&
srv->max_commits_display != 1)
commit_found = 1;