mirror of
https://github.com/git-for-windows/git.git
synced 2026-06-10 13:02:41 -05:00
Merge branch 'jk/apply-leakfix'
Leakfix. * jk/apply-leakfix: apply: plug leak on "patch too large" error
This commit is contained in:
6
apply.c
6
apply.c
@@ -4881,8 +4881,10 @@ static int apply_patch(struct apply_state *state,
|
||||
|
||||
state->patch_input_file = filename;
|
||||
state->linenr = 1;
|
||||
if (read_patch_file(&buf, fd) < 0)
|
||||
return -128;
|
||||
if (read_patch_file(&buf, fd) < 0) {
|
||||
res = -128;
|
||||
goto end;
|
||||
}
|
||||
offset = 0;
|
||||
while (offset < buf.len) {
|
||||
struct patch *patch;
|
||||
|
||||
Reference in New Issue
Block a user