fix potential leak, found by clang-analyzer
1 files changed, 1 insertions(+), 0 deletions(-) | |||
---|---|---|---|
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;