commit - b1317e77b872eb5ef148f76b5b63d358cc868a75
commit + 3affba96cf2f8128eea9145e7f67e254dfde02df
blob - 6f3b5690a4904d553f8f4701e41410074501f214
blob + bc507c2e7bd69941d2a5a4e2b676a5b0762e0782
--- got/got.c
+++ got/got.c
if (error == NULL)
error = repo_error;
}
- for (i = 0; i < bca.nlines; i++) {
- struct blame_line *bline = &bca.lines[i];
- free(bline->id_str);
- free(bline->committer);
+ if (bca.lines) {
+ for (i = 0; i < bca.nlines; i++) {
+ struct blame_line *bline = &bca.lines[i];
+ free(bline->id_str);
+ free(bline->committer);
+ }
+ free(bca.lines);
}
- free(bca.lines);
free(bca.line_offsets);
if (bca.f && fclose(bca.f) == EOF && error == NULL)
error = got_error_from_errno("fclose");