summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacques Germishuys <jacquesg@striata.com>2014-09-25 15:29:35 +0200
committerJacques Germishuys <jacquesg@striata.com>2014-09-26 12:12:09 +0200
commit5387cfee4cf4c4c0410e947f27555d0a6e87dc81 (patch)
tree92bc9422f7dc90b97d8319b5e16ba58f9fa92737
parente640a77c9f1b0fb111553b5ee3c3be7c51d11bd5 (diff)
downloadlibgit2-5387cfee4cf4c4c0410e947f27555d0a6e87dc81.tar.gz
Ensure patch is initialized to zero, otherwise, the allocated flag may be set
-rw-r--r--src/diff_patch.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/diff_patch.c b/src/diff_patch.c
index 38d5f4257..4e0672aa1 100644
--- a/src/diff_patch.c
+++ b/src/diff_patch.c
@@ -274,6 +274,7 @@ int git_diff_foreach(
return error;
memset(&xo, 0, sizeof(xo));
+ memset(&patch, 0, sizeof(patch));
diff_output_init(
&xo.output, &diff->opts, file_cb, hunk_cb, data_cb, payload);
git_xdiff_init(&xo, &diff->opts);