Ensure patch is initialized to zero, otherwise, the allocated flag may be set

This commit is contained in:
Jacques Germishuys 2014-09-25 15:29:35 +02:00
parent e640a77c9f
commit 5387cfee4c

View File

@ -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);