Merge branch 'jk/apply-leakfix'

Leakfix.

* jk/apply-leakfix:
  apply: plug leak on "patch too large" error
This commit is contained in:
Junio C Hamano
2026-05-22 08:48:20 +09:00
+4 -2
View File
@@ -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;