summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--builtin-apply.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/builtin-apply.c b/builtin-apply.c
index c159873..be2c715 100644
--- a/builtin-apply.c
+++ b/builtin-apply.c
@@ -1700,10 +1700,8 @@ static int apply_data(struct patch *patch, struct stat *st, struct cache_entry *
return -1;
/* NUL terminate the result */
- if (desc.alloc <= desc.size) {
+ if (desc.alloc <= desc.size)
desc.buffer = xrealloc(desc.buffer, desc.size + 1);
- desc.alloc++;
- }
desc.buffer[desc.size] = 0;
patch->result = desc.buffer;