diff options
author | Edward Thomson <ethomson@edwardthomson.com> | 2015-09-24 10:32:15 -0400 |
---|---|---|
committer | Edward Thomson <ethomson@github.com> | 2016-05-26 13:01:07 -0500 |
commit | 4117a2350f87456d76659d9327193bb708187ba9 (patch) | |
tree | cd15f610dda604355ec3755a2ffb0c95cc545a8d /src/patch_diff.c | |
parent | 6278fbc5dd5467e3f66f31dc9c4bb4a1a3519ba5 (diff) | |
download | libgit2-4117a2350f87456d76659d9327193bb708187ba9.tar.gz |
patch parse: dup the patch from the callers
Diffstat (limited to 'src/patch_diff.c')
-rw-r--r-- | src/patch_diff.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/patch_diff.c b/src/patch_diff.c index 1a3aeda5e..b8adcf3e1 100644 --- a/src/patch_diff.c +++ b/src/patch_diff.c @@ -25,6 +25,12 @@ static void patch_diff_free(git_patch *p) { git_patch_diff *patch = (git_patch_diff *)p; + git_array_clear(patch->base.lines); + git_array_clear(patch->base.hunks); + + git__free((char *)patch->base.binary.old_file.data); + git__free((char *)patch->base.binary.new_file.data); + git_diff_file_content__clear(&patch->ofile); git_diff_file_content__clear(&patch->nfile); |