summaryrefslogtreecommitdiff
path: root/stagit.c
diff options
context:
space:
mode:
authorHiltjo Posthuma <hiltjo@codemadness.org>2017-03-12 21:30:43 +0100
committerHiltjo Posthuma <hiltjo@codemadness.org>2017-03-12 21:30:43 +0100
commit1d91c79e3c26c62bee0c047fe1db02668ca94721 (patch)
treeb2096ea00df21340759ead7b03173e39b27b73bc /stagit.c
parentae6461dc6f6ddc1d4bb33eef9cee71d4e7599458 (diff)
fix potential leak, found by clang-analyzer
Diffstat (limited to 'stagit.c')
-rw-r--r--stagit.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/stagit.c b/stagit.c
index 835f6f3..06b6698 100644
--- a/stagit.c
+++ b/stagit.c
@@ -114,6 +114,7 @@ commitinfo_getstats(struct commitinfo *ci)
err(1, "calloc");
if (git_patch_from_diff(&patch, ci->diff, i)) {
git_patch_free(patch);
+ free(di);
goto err;
}
di->patch = patch;