fix potential leak, found by clang-analyzer - stagit-gopher - A git gopher fron… | |
git clone git://bitreich.org/stagit-gopher/ git://enlrupgkhuxnvlhsf6lc3fziv5h2h… | |
Log | |
Files | |
Refs | |
Tags | |
README | |
LICENSE | |
--- | |
commit 1d91c79e3c26c62bee0c047fe1db02668ca94721 | |
parent ae6461dc6f6ddc1d4bb33eef9cee71d4e7599458 | |
Author: Hiltjo Posthuma <[email protected]> | |
Date: Sun, 12 Mar 2017 21:30:43 +0100 | |
fix potential leak, found by clang-analyzer | |
Diffstat: | |
M stagit.c | 1 + | |
1 file changed, 1 insertion(+), 0 deletions(-) | |
--- | |
diff --git 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; |