mirror of
https://github.com/git/git.git
synced 2026-05-25 11:25:06 +02:00
Merge branch 'jk/apply-leakfix'
Leakfix. * jk/apply-leakfix: apply: plug leak on "patch too large" error
This commit is contained in:
@@ -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