Commit Diff


commit - 407521c004a585e93d6e493eb0d5193f67197edd
commit + 2aea6fc2c2c95ba4968b598247e00edb6f91048b
blob - 480db657495cca3ac7c1561072761f06f1e16a98
blob + e22d214bd2d3e68c26a5394cc271c0a6e204a5aa
--- gotwebd/got_operations.c
+++ gotwebd/got_operations.c
@@ -423,10 +423,8 @@ got_get_repo_commits(struct request *c, int limit)
 					error = got_error_from_errno("strdup");
 					goto done;
 				}
-				if (commit) {
-					got_object_commit_close(commit);
-					commit = NULL;
-				}
+				got_object_commit_close(commit);
+				commit = NULL;
 				TAILQ_REMOVE(&t->repo_commits, repo_commit,
 				    entry);
 				gotweb_free_repo_commit(repo_commit);