fix mem leak in blame_changes() error path
diff --git a/lib/blame.c b/lib/blame.c
index bcd2b1e..fdaf2c0 100644
--- a/lib/blame.c
+++ b/lib/blame.c
@@ -168,8 +168,10 @@ blame_changes(struct got_blame *blame, struct got_diff_changes *changes,
err = got_diffoffset_add(diff_offsets->chunks,
old_lineno, old_length, new_lineno, new_length);
- if (err)
+ if (err) {
+ free_diff_offsets(diff_offsets);
return err;
+ }
}
SLIST_INSERT_HEAD(&blame->diff_offsets_list, diff_offsets, entry);