stagit

fix potential leak, found by clang-analyzer

Hiltjo Posthuma contact@arjunchoudhary.com

commit: 1647588 parent: a2cf87d
1 files changed, 1 insertions(+), 0 deletions(-)
Mstagit.c+1-0
M · stagit.c +1, -0
1@@ -114,6 +114,7 @@ commitinfo_getstats(struct commitinfo *ci)
2 			err(1, "calloc");
3 		if (git_patch_from_diff(&patch, ci->diff, i)) {
4 			git_patch_free(patch);
5+			free(di);
6 			goto err;
7 		}
8 		di->patch = patch;