fix potential leak, found by clang-analyzer
This commit is contained in:
parent
ae6461dc6f
commit
1d91c79e3c
1 changed files with 1 additions and 0 deletions
1
stagit.c
1
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;
|
||||
|
|
Loading…
Reference in a new issue