Commit Diff


commit - d3a6241d268d5433724e871be827d2327de510a8
commit + d38635a394cab631d6a100b34ae0bd6f9b651bba
blob - 1aaa3950ad684460ca2cae980a4405574152a8bd
blob + 5b43de52069cdd84833cd21745ef175b0bce5ade
--- gotwebd/got_operations.c
+++ gotwebd/got_operations.c
@@ -1296,7 +1296,8 @@ got_output_file_blame(struct request *c)
 	    GOT_DIFF_ALGORITHM_MYERS, got_gotweb_blame_cb, &bca, NULL, NULL,
 	    fd3, fd4, f1, f2);
 
-	if (blob) {
+done:
+	if (bca.lines) {
 		free(bca.line_offsets);
 		for (i = 0; i < bca.nlines; i++) {
 			struct blame_line *bline = &bca.lines[i];
@@ -1304,7 +1305,6 @@ got_output_file_blame(struct request *c)
 			free(bline->committer);
 		}
 	}
-done:
 	free(bca.lines);
 	if (fd2 != -1 && close(fd2) == -1 && error == NULL)
 		error = got_error_from_errno("close");